How to update MPNS channel URI after application inactivity

The saved notification channel URI may be deprecated while my application is inactive, that is, stopped, blocked, or inactive. What is the best practice for updating a channel URI with my web service after a period of inactivity?

Various articles on the Internet mention "getting" a URI to send it to a web service. But as far as I can tell, the only way for my application to find out the channel URI is an event ChannelUriUpdatedon HttpNotificationChannel, and raising this event is not under my control. Maybe MPNS changed the URI while my application is inactive. If the application cannot respond to ChannelUriUpdated, the URI will then be deprecated both in my application and in my web service.

Perhaps the channel returned HttpNotificationChannel.Findwill always have the updated channel URI?

+5
source share
2 answers

It is common practice to query the current Uri channel when starting the application. In the application, you should keep track of the last return value (through application calls) and if it has been modified to upload to the web service.

0
source

, . , script uri, , URI , , , . , uri , uri, uri . .

. - , . , .

0

All Articles