Comments (13)
+1 for a solution :)
from phonegap-nfc.
Given a tag with a URI - TNF_WELL_KNOWN, Type U, Payload http://windowsphone.com
My WP8 code can read NFC tags OK with the following
proximityDevice.SubscribeForMessage("NDEF", MessageReceivedHandler);
MessageReceivedHandler manually parses the NDEF message
The problem is that even though my app is running, WP8 prompts the user "Receive content? Someone is sharing a website from windowsphone.com with you." This WP8 dialog shows up over my app.
When my app is running in the foreground I want WP8 to ignore NFC tags. (This is what Android does with foreground dispatch.)
I tried adding additional subscribers for "Windows", "WindowsURI" but that didn't work either. I need something like Javascript's e.preventDefault().
from phonegap-nfc.
I assume you took a read through https://ndef.codeplex.com/ ?
from phonegap-nfc.
Half way down this page: http://developer.nokia.com/Community/Wiki/Windows_Phone_8:_Treasure_Hunt_Application_Example_using_NFC_and_Nokia_Maps_API
Search for "using Windows.Networking.Proximity;"
from phonegap-nfc.
@JohnMcLear Just tried the NDEF Demo example from ndef on codeplex. It has the same problem when scanning a URI tag. The app reads the tag, but so does WP8, so the user gets a dialog box over the app.
from phonegap-nfc.
oh boy ;\ looks like that's the best experience we can get now then?
from phonegap-nfc.
The Nokia NFC Write app is able to suppress WP8 from reading tags while it is writing to a tag
http://www.windowsphone.com/en-gb/store/app/nokia-nfc-writer/709e64e0-5849-4ce4-b252-b7b252aefacf
from phonegap-nfc.
Just an update, me and don both bumped folks at MS and NOK about this issue, we're awaiting a response.
from phonegap-nfc.
http://msdn.microsoft.com/en-us/library/windows/apps/hh701129.aspx
Windows will always handle "WindowsUri" messages by prompting the user to view a received URI ... even if another app is also subscribed to "WindowsUri".
Windows will always handle "WindowsMime" messages by prompting the user to view the mime content that was received, even if an app is also subscribed for the mime content.
from phonegap-nfc.
Testing other apps:
http://www.windowsphone.com/en-us/store/app/nfc-publisher-pro/45f5f690-c894-4087-9cc0-708d7624b886 manages to suppress during write, not during read. <-- might be worth contacting this author? -- appears to be the case that if you are publishing at the time it will suppress a message? [email protected] being their email
https://projects.developer.nokia.com/nfctagreader does not suppress on read
http://www.windowsphone.com/en-gb/store/app/nfc-tag-writer/895711f1-2b38-4af1-8780-f6501f4371e0 does not suppress on read/write
from phonegap-nfc.
@JohnMcLear it is probably fine to call nfc.write(message, success, failure) anytime on WP8, since WP8 probably doesn't attempt the write until a tag is in range. Android is different where nfc.write must be called from inside the callback when a NFC tag is in range. I'll see if that works, then figure out the correct way to document it or change the code.
from phonegap-nfc.
+1 @don -- Thanks
from phonegap-nfc.
Documentation looks OK https://github.com/chariotsolutions/phonegap-nfc#nfcwrite
from phonegap-nfc.
Related Issues (20)
- Support for ISO18092 tags in iOS
- Writing NFC Tag didn't succeeded every time in Quasar Cordova mobile App
- android NFC Card HOT 1
- NFC scanning not working IOS HOT 7
- SerialNumber not being retrieved on iOS HOT 1
- Android 12 SDK not fire scan event HOT 3
- Ionic NFC on Android 12 Crushing the App HOT 8
- Ionic Android 13 makeReadOnly java.io.IOException HOT 3
- Does not work with Xcode 14.3 and iOS 16.4 HOT 3
- Does this plugin support BAC ( Basic Access Control ) to read NFC Chip on ePassport ? HOT 1
- NFC Writting Error - Only one tag technology can be connected at a time HOT 6
- Ionic capacitor targetsdk 33 app crash with plugin is installed without nfc plugin work works ok HOT 28
- On ios while reading tag give error 203. "System resources unavailable HOT 7
- NFC Tag Writing Issue HOT 1
- The first two Characters are getting trimmed
- Android Api 34 error Android 14
- Android Api 34 error Android 14 HOT 11
- NfcPlugin.java:554
- NEW Repo for issues and contributions HOT 9
- Read sectors and blocks of my mifare card with C#
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phonegap-nfc.