在 Windows Phone 8 上从 SMS 自动启动应用程序

在 Windows Phone 8 上从 SMS 自动启动应用程序

问题描述:

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

I would like to launch an application using parameters provided from an SMS. The behaviour I wish to achieve is that as soon as the user receives an SMS, the application will be launched with the parameters provided in the SMS. I.e. seamlessly present the SMS in a more user friendly way.

我已经尝试过 URI 协议关联,到目前为止,我可以向测试手机发送带有文本 unleashed:param=test 的 SMS(协议取自Windows Phone 8 Unleashed"一书,代码位于 WP8UnleashedSource_01_05\Source\FileAndProtocolAssociations 中).当按下收到的短信中的链接时,应用程序将成功启动.

I have experimented with URI protocol associations and so far I can send an SMS to the test phone with text unleashed:param=test (protocol is taken from book "Windows Phone 8 Unleashed", code is in WP8UnleashedSource_01_05\Source\FileAndProtocolAssociations). When pressing the link in the received SMS the application is launched successfully.

但如果能在收到短信后立即自动启动应用程序,那就太好了.

But it would be great if the is a way to also launch the application automatically as soon as the SMS is received.

这是否适用于 8 及更高版本的所有 Windows Phone 型号和版本?或者是否有其他方法(例如使用推送通知)更适合实现我描述的无缝用例?

Is this possible on all Windows Phone models and versions from 8 and up? Or are there other approaches, for example use push notifications, that are better suited to achieve the seamless use-case I described?

谢谢&问候

这个问题类似于通过短信启动应用程序(URI-Association) 但我想专注于自动启动.

This question is similar to Launch App through SMS (URI-Association) but I would like to concentrate on the automatic launch.

由于某些安全原因,这在 Windows Phone 8 上是不可能的.

This is not possible on the Windows Phone 8 due to some security reasons.

这在 Windows Phone 8.1 中可能是可能的.我在某处读到 8.1 支持 3rd 方 SMS 客户端.这可能意味着在收到新短信时可能会触发某些事件.不过我不确定.

This might be possible in Windows Phone 8.1. I read somewhere that 8.1 supports 3rd party SMS clients. This might mean there may some event that fires when new SMS are received. I am not sure though.

我仍然建议您使用推送通知.

I would still suggest you to use Push Notifications.