Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The <code>Token</code> is never permanent.</p> <p>In iOS, the Device Token is the same for all the applications on the device. In practice, it stays the same until you upgrade your iOS version or restore your device from a backup. In theory Apple say it may change anytime, so you should handle this case.</p> <blockquote> <p>By requesting the device token and passing it to the provider every time your application launches, you help to ensure that the provider has the current token for the device. If a user restores a backup to a device or computer other than the one that the backup was created for (for example, the user migrates data to a new device or computer), he or she must launch the application at least once for it to receive notifications again. If the user restores backup data to a new device or computer, or reinstalls the operating system, the device token changes. Moreover, never cache a device token and give that to your provider; always get the token from the system whenever you need it. If your application has previously registered, calling registerForRemoteNotificationTypes: results in the operating system passing the device token to the delegate immediately without incurring additional overhead.</p> </blockquote> <p>In Android, the Registration ID is different for each application on the same device. It sometimes changes when you un-register your app from GCM and then re-register it. However, the old Registration ID often works for sending GCM messages to the app (you would get a canonical registration ID in the response in this case, asking you to use the newest Registration ID). That said, Google also claim the registration ID may change any time, so you should handle this case.</p> <blockquote> <p>Note that Google may periodically refresh the registration ID, so you should design your Android application with the understanding that the com.google.android.c2dm.intent.REGISTRATION intent may be called multiple times. Your Android application needs to be able to respond accordingly.</p> <p>The registration ID lasts until the Android application explicitly unregisters itself, or until Google refreshes the registration ID for your Android application.</p> </blockquote> <p>In Windows Phone, I'm not sure how often does the Notification Channel URI changes in practice, but Microsoft also claim it may change anytime.</p> <blockquote> <p>All apps should register for the ChannelUriUpdated event in case the push notification URI changes. Even if you already have a channel opened, you should register for the ChannelUriUpdated event in case the URI changes.</p> </blockquote> <p>To summarize, you should always treat the <code>Token</code> as if it may change any time you restart your application.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload