Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Windows Phone 7.5 - Push Notifications when app is tombstoned

I have written a Windows 7.5 phone app that registers for tile and toast push notifications with MPNS. I have all the infrastructure working and the phone registers with MPNS. I save the ChannelUri locally on the phone and then post the ChannelUri to a rest service endpoint on my website which records the device / ChannelUri. I'm able to send toast and tile messages from the web service and receive them on the phone without any problem. If the application is running I'm able to trap the ShellToastNotificationReceived event and can read the push notification details and I save the message to a local database in the application and the messages are also displayed to the user in a Listbox. The system is disconnected from my website other than having to register the ChannelUri and all the data I need is contained with the notification.

My question is when the application has been tombstoned and I send a push notification I see a toast message displayed by the phone OS and if I click on the toast I have put a URI pointing to a page in my application and this re-launchs the app and I can trap all the data in the message and can save it again to the database. But if the application is tombstoned and the user misses the toast I have no way of saving that message it is lost unless I write some logic to go back to my server and check if the messages I have locally match the ones it sent. Am I missing something or am I going to have to run a check with my server when the app re-launches and re-sync with my server for any toast push notifications the user might have missed.

Thanks

like image 826
Gavin Avatar asked Apr 26 '12 19:04

Gavin


1 Answers

When a push notification is received while the application is not running or is tombstoned there is no way to handle the data if nothing was done with the missed toast. You might need confirmation logic on the server to check whether the message is received or not.

like image 145
Den Delimarsky Avatar answered Sep 20 '22 18:09

Den Delimarsky