Skip to content

Requirements AzurePush

Colby Williams edited this page Mar 9, 2018 · 1 revision
  • Register
  • Unregister

From: Using REST APIs from the Device

When using the REST APIs from a mobile device, a common pattern is to store the registrationIds of the registrations associated with the device in local storage. This enables you to update tags and channel information with a single update call.

Because mobile connections are not always reliable, it is best to avoid creating a new registration without being able to store the registrationId in local storage. This can result in the device registering multiple times, causing duplicate notifications. You can achieve this by using the Create Registration ID and Create or Update Registration REST APIs.

The first API returns a registrationId without actually creating a registration. When the ID has been securely stored on the device storage, the device can call the Create or Update Registration API.

In order to keep the device local storage in sync with the hub, even in the event of loss of local storage data, it is suggested that you delete all registrations with the current channel (that is, the ChannelURI, device token, or GCM registrationId) every time local storage is not initialized.

REST API Resources