简体   繁体   English

如何在Windows Phone中完成死设备识别

[英]How is dead device identification done in windows phone

How is dead device identification done in windows phone when we make use of micosoft push notification service? 当我们使用micosoft推送通知服务时,如何在Windows Phone中完成死设备识别? Does mspn store information about such devices? mspn是否存储有关此类设备的信息? Is it possible for an application to retrieve the list? 应用程序是否可以检索列表?

Uri Channels can expire. Uri频道可以过期。 This is why you should regularly check and refresh them from the client. 这就是您应该定期检查并从客户端刷新它们的原因。

If the channel is no longer valid (as will happen when the app isn't used for a long time and the URI expires) you'll get an error in the repsonse when you try and send the message. 如果频道不再有效(当应用程序长时间未使用且URI过期时会发生这种情况),当您尝试发送消息时,您将在repsonse中收到错误消息。
You shoudl use this method to detect URIs that are no longer valid. 您应该使用此方法来检测不再有效的URI。

There is no way to get a list of URIs that are no longer valid or to test validity without sending a message. 无法获取不再有效的URI列表或无法在不发送消息的情况下测试有效性。

There is no way to ask the server for any expired notification channels however if you look t the response codes coming back from the MS services when you're attempting to send a notification (from your server) you'll be able to determine if the channel has expired. 没有办法向服务器询问任何过期的通知渠道,但是如果您在尝试发送通知时(从您的服务器)查看从MS服务返回的响应代码,您将能够确定是否频道已过期。 If you look at Push Notification Service Response Codes for Windows Phone you'll note that basically if you get a 404 Not Found back from the service then the channel has been expired and you should stop sending to it. 如果您查看Windows Phone的推送通知服务响应代码,您会注意到,如果您从服务中获得404 Not Found ,那么该频道已经过期,您应该停止向其发送。 It's worthwhile handling the other cases as well. 值得处理其他案例。 Eg. 例如。 Handling 200 OK / QueueFull messages correctly allows you to lighten the workload on your server by pausing notifications for that subscription for a period of time. 正确处理200 OK / QueueFull消息可以通过在一段时间内暂停该订阅的通知来减轻服务器上的工作负载。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM