Progress will discontinue Telerik Platform on May 10th, 2018. Learn more

push.register

push.register

This method offers alternative signatures:

push.register(settings, [success], [error])

Signature

push.register(settings, [success], [error])

Description

Enables push notifications on the device and registers it for the feature with Telerik Backend Services if it hasn't already been registered. If it has been registered, the registration details are updated. Telerik Backend Services if it hasn't already been registered. If it was registered the registration details are updated.

Parameters

Parameter Name Type Default Description
settings Object Settings for the registration. Can include custom parameters to be saved in backend services.
settings.iOS Object null iOS specific settings
settings.iOS.alert Boolean true Specifies whether the device will display an alert message.
settings.iOS.badge String / Number '+1' Specifies the badge counter to be displayed on the device.
settings.iOS.clearBadge Boolean false Specifies whether to reset the badge count to 0.
settings.iOS.sound Boolean true Specifies whether the device will play a sound.
settings.android Object null Android specific settings
settings.android.senderID String null This is your Google API project number. It is required when obtaining a push token for an Android device.
settings.android.projectNumber String null Synonym for android.senderID. Available in JavaScript SDK versions 1.2.7 and later.
settings.wp8 Object null Windows Phone specific settings
settings.wp8.channelName String null The name of the push channel that the device is registering to.
settings.notificationCallbackIOS function Specifies a custom callback to be used when a push notification is received on iOS.
settings.notificationCallbackAndroid function Specifies a custom callback to be used when a push notification is received on Android.
settings.notificationCallbackWP8 function Specifies a custom callback to be used when a push notification is received on Windows Phone 8.
settings.customParameters Object null Specifies optional custom registration parameters that will be saved in Telerik Backend Services.
[success] function Callback to invoke on success.
[error] function Callback to invoke on error.


push.register(settings)

Signature

push.register(settings)

Description

Enables push notifications on the device and registers it for the feature with Telerik Backend Services if it hasn't already been registered. If it has been registered, the registration details are updated.

Return Type

Promise - The promise for the request.

Parameters

Parameter Name Type Default Description
settings Object An object containing settings for the registration. It can include custom parameters to be stored by Backend Services.
settings.iOS Object null iOS-specific settings.
settings.iOS.alert Boolean true If set to true, the push notification will display as a standard iOS alert.
settings.iOS.badge String / Number '+1' Specifies the badge counter to be displayed on the device.
settings.iOS.clearBadge Boolean false Specifies whether to reset the badge count to 0.
settings.iOS.sound Boolean true If set to true, the device will play a notification sound.
settings.android Object null Android-specific settings.
settings.android.senderID String null Your Google API project number. It is required when obtaining a push token for an Android device.
settings.android.projectNumber String null Synonym for android.senderID. Available in JavaScript SDK versions 1.2.7 and later.
settings.wp8 Object null Windows Phone specific settings.
settings.wp8.channelName String null The name of the push channel that the device is registering to.
settings.notificationCallbackIOS function Specifies a custom callback to be used when a push notification is received on iOS.
settings.notificationCallbackAndroid function Specifies a custom callback to be used when a push notification is received on Android.
settings.notificationCallbackWP8 function Specifies a custom callback to be used when a push notification is received on Windows Phone 8.
settings.customParameters Object null Specifies optional custom registration parameters that will be saved in Telerik Backend Services.


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.