We're developing an application which is receive toast notification when app is not active.
But it's seem like Mvvmcross Core have taken control of the application and control the RootFrame. So when a toast notifcation comming, user click in that toast and the application doesn't launch exactly to the uri was set in the push, it launched to page that was set in Core when App Start.
I would ask if there's anything solution for this case ?
Thank you very much :)
This scenario is covered by "Custom app starts" - it's covered for WP in https://speakerdeck.com/cirrious/appstart-in-mvvmcross - there's also some information about custom AppStart in the wiki on http://github.com/mvvmcross/mvvmcross/wiki
Related
So i've created an application in visual studio for windows phone using a web view and I'm just wondering if its possible to send a message to the user that pops up as an alert when they are outside of the app? Every week I want the user to receive a notification from the application. After some searching around I wasn't able to find much information on this that is specific to web views so I'm not sure if this is possible using javascript?
Thanks for the help
What you want to do is create scheduled toast notification. You need to use WinJS or C# to do the job. You can call functions outside of the webview from javascript using ScriptNotified event
I would like to launch an application using parameters provided from a push notification on Windows Phone 8.
The behaviour I wish to achieve is that as soon as the user receives the notification, the application will be launched with the parameters provided in the notification. I.e. seamlessly present the notification in a more user friendly way.
As far as I understood there are three push notification mechanisms. Toasts, Tiles and Raw.
None of them seems to be able to handle the wanted behaviour.
Toast: The message is shown even if the application hasn't been started. It does not start the application unless clicked on but seems to be closest to the target.
Tile: Message is shown if the application has been pinned. But they may be difficult to notice unless the tile is pinned fairly high on the start screen.
Raw: Works in more power states but requires the application to be running. This doesn't seem to be a match because I want the notification to be received when the application is not running. I couldn't find information about which application states where raw notifications are handled. I would prefer all.
Did I miss something in my research? If anyone has a hint of how to put an application in the foreground from a push notification (without user interaction) it would be greatly appreciated!
My first attempt was to trigger the application start using SMS but that seems to be a no go.
See my post Launch application automatically from an SMS on Windows Phone 8
You can not automatically launch an application on Windows Phone (and neither can you on iOS or Android). What you can do is provide a URI with the Push notification so the user is taken to a page with the needed information
you can not put an application in the foreground from background without user interaction.
I recently submitted a very simple app to the WP app store that is basically buttons that play sounds on click.
However, the app failed certification for the following reason(s):
Comments: Result: Fail
The application terminates unexpectedly in response to user input.
Steps to Reproduce:
Play music from music+videos hub and Launch the application.
Tap on any option from MY APPS NAME HERE.
Notice the application unexpectedly terminates.
Comments: Result: Fail
The application terminates unexpectedly in response to user input.
Steps to reproduce:
Play music on the device from the Music + Videos Hub.
Launch the application.
Press the device's universal volume control.
Select "Pause" from the device's universal volume control.
Notice the application unexpectedly terminates.*
My questions are:
What is "the device's universal volume control" ?
How can I stop these errors from happening?
I used Blend to assign a sound to the buttons so there is no code to work with as far as I can see.
I've written similar apps for the Android market and always use a 'stop' and 'release' for each mediaplayer element at the beginning of each button's code. I'm assuming I need something similar here but not sure how to go about it in WP8. Any ideas?
Unviersal volume control refers to the phone physical volume buttons.
Did you have AdMod ads in your app? Recently i found an app with the same behavior failing certification and it was caused by AdMob control doesn't working right when the volume buttons show the volume popup over the app.
If you follow this link, you can see a workaround:
https://groups.google.com/forum/#!topic/google-admob-ads-sdk/vw61ZdJALYo
Hope this helps.
I'm using Worklight 6.1 and sending push notifications to Windows Phone 8. It is working swell, except for the tile badge. It is not being cleared when I use the tile to launch the app. The notification that I'm sending is:
{"APNS":{ … },"GCM":{ … },"SMS":{ … },"MPNS":{"raw":{"payload":{}},"toast":{"text1":"Luggage Tracker","text2":"You have 3 available messages"},"tile":{"count":3}}}
The toast message pops up, and the tile gets the badge, but the badge doesn't clear when I launch the app, and the only way I can find to clear it is to have the server push another notification with: tile {count:0}
Is there any way for the app to clear the tile badge?
Update: the WL.Badge API is iOS-only. I have submitted an RFE to either enhance it or create specialized API for clearing the tile in Windows Phone 8 as well.
So the solution at this time, as I see it, is to create a Cordova plug-in to update the count... I found this plug-in. Perhaps you take from it when you need: https://github.com/sgrebnov/incubator-cordova-wp8/blob/master/plugins/www/plugins/LiveTiles/liveTilesExample.html
Use the WL.Badge.setNumber() API method.
Setting 0 should clear the badge from the tile.
WL.Badge.setNumber(0);
You can probably use this in the same logic that handles the received push (the one that shows the Toast pop up notification).
Worklight does not provide any mechanism to handle the badges other than methods to set or remove so you need to write one of your own.
I made a little app for WP8 that would fetch notifications from Azure mobile service table (and it did). Then I added push to it. The app is identical to the sample app given on the Azure website. I even tried the sample one and the same thing happened: log shows toasts have been sent but my device doesn't receive any at all.
Also, I have done the same with WinJS app and it works flawlessly.
Last night, I tried it again and got toast on device just once out of nearly 20 requests.
I am clueless - if its the code that you are looking for it's right here http://www.windowsazure.com/en-us/develop/mobile/tutorials/get-started-with-push-wp8/
Any help would be appreciated, thanks!
Were you running the application in the foreground on the phone at the time? Toasts don't show on WP8 if the app is in the foreground.