I wan't to inform the user over some processes (e.g. Login successfully/failed or something else). In Android I used the Toasts Messages to let them show a short time. For WP 8.1 I tried the ToastNotificationManager to get the same results. Unfortunately the wp-toast has an audio signal and it spams the notification center.
I checked the Libs Toastinet and coding4fun toolkit toast, but this libs are WP 8.0 / Silverlight only and I need a solution for WP Runtime 8.1.
You can set which sound to play by setting the audio element in the toast's xaml. This can be set to silent if appropriate.
You can control how your toasts appear in the action center by setting properties on the ToastNotification object or in the X-WNS- headers sent to WNS. This allows grouping, tagging, expiring, removing, etc. See Managing toast notifications in action center (Windows Phone Store apps) on MSDN for details.
That said, if you're talking about notifications during the ordinary running of the app you may not want to use toasts. You may be better off showing warnings and such in-line or in your own screen-top panel (the latter is more important for Windows than Windows Phone, since toasts look quite different on each).
See Guidelines and checklist for toast notifications and Choosing the right UI surfaces: Errors.
Related
When I enumerate Bluetooth LE devices using WinRT API, sometimes, I needed to reset Bluetooth radio to successfully find my device. I am wondering is there an easy way to do this from code (Windows SDK, WinRT, WMI etc)?
After digging through Windows Universal samples from Microsoft, I have found a sample RadioManager which shows how to access Radios and turn ON/OFF from code at will. I was able to use the API successfully with a caveat that when used from Desktop WPF app, the app has to be built to match native architecture of the machine. Otherwise, ‘GetRadiosAsync’ method returns empty set.
I'm not totally sure, but resetting the system-wide Bluetooth radio is the sort of action highly unlikely to be available to an execution environment with non-admin privileges.
Anything able to stomp over the abilities of other processes (like turning off a radio) is not going to available in WinRT.
Edit: I stand corrected. Such an API apparently exists:
Windows.Devices.Radios.SetStateAsync
In Windows Phone Store for Windows Phone 8.1 OS are applications with or without the with Live Tile sign under logo in app overview.
Which criteria must the application meet to be detected by Store as it supports Live Tile?
I know that the answer should be obvious – it must support Live Tile, but it is not as simple as it looks like. My app is not detected as it supports Live Tile.
It calls PushNotificationChannelManager.CreatePushNotificationChannelForApplicationAsync, uploads the PushNotificationChannel.Uri to the server and the server sends tile updates via WNS. The tile is regularly updated.
It contains all scales of all visual assets.
Contacted MSFT Support:
There is no explicit check. The flag is set during manual instigation
of the app in the publishing process.
As the app submission has been changed to publish your app immediately, this flag will only come up once your app is manually checked. That usually only happens some days after your app is published and only in rare cases for updates (or when somebody complains about your app).
Also: The tester has to notice that there is a live tile. If it comes through push or there is no data at the moment of testing or it requires a specific setup, that will just not be visible.
I recommend hinting your live tile in the certification notes field (under describe your package) to make sure the tester is informed that you have a live tile option.
Most probably the Store show the with Live Tile tag for Silverlight (XAP) apps but not for Store (Runtime) apps.
Per the Windows 8.1 documentation, the UIElement.Holding event, the "exact timing of what the system interprets as a holding action is adjustable by users through system settings"
What exactly is meant by this? It would suggest that the user should be able to change the timing of what is interpreted as a holding action through the device's settings, but I see no such option on Windows Phone 8.1.
Or is this an option available to the developer? If so, how can the developer modify this setting for the app?
Thanks
As per the comment here on the Microsoft Phone Dev Center forums from Rob Caplan (a Microsoft employee),
"This is not adjustable by apps. It is a user setting. I believe that
on Windows systems it will be based on the double click rate (most UI
timings are based on that). I'm not sure on the phone. There may be an
adjustment in the ease of access centre."
There is no such adjustment on Windows Phone 8.1 Developer Preview in the Ease of Access settings.
It seems like there is nothing I can do here. Perhaps it is possible to code your own gestures in Silverlight?
I am developing a Windows phone 8 app that need to run only in background with UI. Is there any way I can run the app in the background, or without actually being open?
It depends upon what you want to do in the background. Generally speaking you can't implement something like a Windows service that will startup automatically when the phone is launched.
That said you can run your app in the background within given limitations. Check out MSDN for detailed information.
Why all these limitations you might ask yourself? It's to provide a good battery life to the user.
Edit:
For the periodic agent to start running the app must be started once. Further the agent must update a live tile (user must pin it to the start screen) or the app has to be once opened every 14 days.
Another option might be using push notifications to trigger an update..
This is how you do it on Windows Phone 7 http://blog.jerrynixon.com/2011/11/mango-sample-lock-and-run.html is it possible in Windows 8?
This sample is showing you how to implement the functionality so your app will still "run" when the device is locked. It only seems to work with a kind of "background tasks" which makes it not exactly the same as it is for Windows Phone.
http://code.msdn.microsoft.com/windowsapps/Lock-screen-apps-sample-9843dc3a
Please note that an app that can run when the device is locked should have at least one of the following background tasks:
Control Channel
Timer
Push Notification
Here is some more info on the lockscreen: http://msdn.microsoft.com/library/windows/apps/Hh779720
UPDATE:
As far as I have found there is no exact behaviour like in Windows phone to run your app under the lockscreen. There are a few recent posts on the MSDN blogs which explain the background model http://blogs.msdn.com/b/windowsappdev/archive/2012/05/16/being-productive-when-your-app-is-offscreen.aspx?wa=wsignin1.0
Sorry to see that at this moment there is no way to make it work under the lockscreen