Updating a Device Registration

Updating a Device Registration

A push registration for a device consists of several system parameters, including the push token, and may include custom parameters that you supply. To ensure that these fields are always up to date, it is recommended to update the device registration periodically.

To following code updates only the system properties of the registration and keep the custom properties intact:

await app.WorkWith().Push().CurrentDevice.UpdateRegistration().ExecuteAsync();

If you need to update the custom parameters as well, use the method overload that accepts them:

var customDeviceParameters = new DeviceParameters();
customDeviceParameters.Add("age", "26");
customDeviceParameters.Add("City", "London");

await app.WorkWith().Push().CurrentDevice.UpdateRegistration(customDeviceParameters, true).ExecuteAsync();

Set the second parameter to false if you don't want to refresh the system parameters.

See Also


Start a free trial Request a demo
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.