Launch application automatically from a push notification on Windows Phone 8

孤街醉人 提交于 2019-12-11 19:49:09

问题


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.

  1. 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.

  2. 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.

  3. 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


回答1:


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




回答2:


you can not put an application in the foreground from background without user interaction.



来源:https://stackoverflow.com/questions/23628292/launch-application-automatically-from-a-push-notification-on-windows-phone-8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!