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
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.
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.
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.
Related
On IOS and Android it's easy to detect wether a certain app is installed or not. Microsoft is not as friendly for developers and denies the access to information about other apps.
So when launching an url scheme on WP like:
Windows.System.Launcher.LaunchUriAsync(new system.Uri("myApp:MyParams"));
This would open a dialog you can either cancel or "go to store to download the app".
I would like to get a result where this dialog is never shown when the app is not installed and when it is installed the app just opens.
So can anyone help me with that? (of course more ideally would be an availability check but that's not gonna happen so)
Not possible in 8.1, you have to wait for 10 where there is more functionality provided for Launcher.LaunchUriAsync.
You can also call method Windows.System.Launcher.LaunchUriAsync with LauncherOptions param.
LauncherOptions.preferredApplicationPackageFamilyName Is set to the package family name of the app in the store that you want to recommend.
LauncherOptions.preferredApplicationDisplayName Is set to the name of that app LauncherOptions.
You must set both of these options to recommend an app. Setting one without the other will result in a failure.
On WindowsPhone you can launch some applications by using the URI associations. Now I understand and implemented the launching of another App by using:
Windows.System.Launcher.LaunchUriAsync(new System.Uri("<custom-uri-scheme>:<path>"));
But before we tell the Launcher to start the other App we would like to check if the App is actually installed.
Is it possible to check if there is an App present which responds to a given URI? I am looking for something similar to iOS's [[UIApplication sharedApplication] canOpenURL:<url>]
Windows 8.x
No, currently windows phone OS 8.0/8.1 doesn't allow 1 you check if certain third party app is installed on the device or not. Though you can check if the user has installed other app of yours, if the publisher ID is same 2.
1: https://stackoverflow.com/a/13617515/546896
2: https://stackoverflow.com/a/15871975/546896
Windows 10
On Windows Phone 10 it is possible to use Launcher.QueryUriSupportAsync
I am trying to do an app, that lets the user select the ringtone from the system ringtone list in windows phone to alert user when the Toast notification coming.
What i confusing is it's possible to show the system ringtone list and let the user choose for the purpose of alert notification? What i searching in the website are showing that Android are able to do it (RingtonePreference) and about Windows Phone i only found that is enable users to save an audio file to the system ringtones list.
Any help and suggestion will be appreciate. Thank you.
It seems what you want is not possible. According to this thread on MSDN it is not possible to get a list of ringtones:
An app cannot access existing ringtone or alert sounds; however, your app can save a media file to be used as a ringtone...
When Reminder created with set path in NavigationUri param have such issue:
when phone is blocked (under locked screen) and reminder shown, it's impossible to navigate to the app using Tap on title or content of the reminder message.
Is it possible to solve such problem, or it's ussual behaviour for reminder and lock screen?
It's the normal behavior for Windows Phone 7, the user needs to unlock the phone to interact with notifications. There's nothing you can do about it.
There's a few obvious reasons for this behavior. Imagine that the user has put a pin-code on the lockscreen. Someone picking up the phone would be able to bypass the pin-code by tapping on a notification. Or even if there's no code, I may trigger something involuntarily if the phone is inside my pocket when a notification is displayed.
I have a need to display alerts and such on-screen at any time the computer is running. We have a service running collecting these events, so that's not a problem - but I need to find a way to display critical alerts, even if the user hasn't logged in yet; that is, they're sitting at the 'Press Ctrl-Alt-Delete to log in' prompt.
Is this possible? If so, can it be done via managed code (C#)?
In Windows XP and earlier, the system you'd be working with is GINA. This changed in Vista and Windows 7 to "Credential Providers". See here for some background.