4
votes

I'm developing a NFC Application on Windows Phone 8 My question is: How to Disable the default NFC Reader of Windows Phone OS? Everytime I tap a NFC tag, an MessageBox show up, asking if i want to receive the link/file/text. If I tap OK, it will open the default application to "read" that info. When I tap Cancel, I will be able to back to my app, and do what ever I want with the data i received in NFC tag. So how can I disable default reader, or hide the message box. I have try NavigationService.GoBack() on Dispatcher, no luck. It's is an OS's element, so we cannot control from our app

thanks

3

3 Answers

0
votes

Starting with Windows Phone 8.1 we've addressed this problem (check the Windows Phone Developer Preview program if your phone isn't running 8.1 yet). To silence the OS from popping up for a URL for example, ensure you have a "WindowsUri" subscription. The same goes for other types that generate pop-ups. If you want to silence all pop-ups for all types, you can add a subscription for the "NDEF" message type. Of course, your app must be in the foreground with the subscription enabled for this to have an effect.

Pretty much when a message comes in the OS will see if the foreground app has an explicit subscription for that type, and if so will assume that the app is handling it and that the OS doesn't need to pop-up.

2
votes

From http://www.mopius.com/faq/

Q:

How to disable the phone's NFC prompts?

A:

When tapping tags that contain certain standardized / well-known contents, Windows Phone 8 always shows the dialog for the user to choose what to do with – e.g., to visit the URL or to launch the app.

This prompt even appears if the tag is a LaunchApp tag and the respective app is already running – the user will nevertheless be asked to launch the app (again), causing the phone to re-start the running app.

Unfortunately, this behavior of the Windows Phone 8 OS can’t be changed at the moment. We already reported the concern to Microsoft and hope that future versions of WP improve the behavior, in order to enable a better user experience for NFC apps.

1
votes

See the sample app somewhere in the middle of this page and try to write the Windows.MySubType tag: http://developer.nokia.com/community/wiki/Use_NFC_tags_with_Windows_Phone_8

Afterwards the app is able to read the tag without being interupted by a phone prompt.