从 Windows Phone 8 上的推送通知自动启动应用程序 [英] Launch application automatically from a push notification on Windows Phone 8

查看:81
本文介绍了从 Windows Phone 8 上的推送通知自动启动应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用 Windows Phone 8 上的推送通知提供的参数启动应用程序.

I would like to launch an application using parameters provided from a push notification on Windows Phone 8.

我希望实现的行为是,一旦用户收到通知,应用程序将使用通知中提供的参数启动.IE.以更加用户友好的方式无缝呈现通知.

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:即使应用程序尚未启动,也会显示该消息.除非点击它,否则它不会启动应用程序,但它似乎最接近目标.

  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.

平铺:如果应用程序已被固定,则会显示消息.但除非磁贴在开始屏幕上固定得相当高,否则它们可能很难被注意到.

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:在更多电源状态下工作,但需要运行应用程序.这似乎不匹配,因为我希望在应用程序未运行时收到通知.我找不到有关处理原始通知的应用程序状态的信息.我宁愿全部.

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!

我的第一次尝试是使用 SMS 启动应用程序,但这似乎是行不通的.请参阅我的帖子 从 Windows Phone 上的 SMS 自动启动应用程序8

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

推荐答案

您无法在 Windows Phone 上自动启动应用程序(在 iOS 或 Android 上也不能).您可以做的是提供带有推送通知的 URI,以便将用户带到包含所需信息的页面

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

这篇关于从 Windows Phone 8 上的推送通知自动启动应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆