Update PushID
This workflow consists of sending the new PushID to the server if this information has changed compared to the previously registered value. If this is not done, then the application will not be able to receive Push Notifications from the server as the values on the server side and on the device side will not be synchronized. The PushID value might change after an event such as a device OS update.
The mobile application updates the PushID as follows:
-
Create an instance of the Device (DeviceFactory.GetDevice).
-
Update the DEVICE_INFO_PUSHID property (IDevice.UpdateDeviceInfo).
// We assume that you have already provisioned a container.
try
{
await container.UpdateDeviceInfo(Constants.DEVICE_INFO_PUSHID, newpushId, null, null);
}
catch( Exception e )
{
Debug.WriteLine("update device info failed: " + e.Message);
}