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

Push [class]

Description

A class for managing push notifications in your application. Supported are push notifications for hybrid apps on Android and iOS.

Access: protected

Members

Instance members

Name Return type Description
areNotificationsEnabled(options) Promise This method provides a different operation on each supported platform:

- On iOS: Checks if Notifications is enabled for this application in the device's Notification Center.
- On Windows Phone: Checks if the application has an active open channel for communication with the Microsoft Push Notification Service. The outcome does not depend on the device's notification settings.
- On Android: Checks if the application has established a connection with Google Cloud Messaging. The outcome does not depend on the device's notification settings.
areNotificationsEnabled(options, [onSuccess], [onError]) iOS: Checks if the Notifications are enabled for this Application in the Device's Notification Center.
Windows Phone: Checks if the Application has an active opened Channel for communication with the Notification Service. Not relying on the device notification settings.
Android: Checks if the Application has established connection with the Notification Service. Not relying on the device notification settings.
areNotificationsEnabled(options) Promise This method provides a different operation on each supported platform:

- On iOS: Checks if Notifications is enabled for this application in the device's Notification Center.
- On Windows Phone: Checks if the application has an active open channel for communication with the Microsoft Push Notification Service. The outcome does not depend on the device's notification settings.
- On Android: Checks if the application has established a connection with Google Cloud Messaging. The outcome does not depend on the device's notification settings.
areNotificationsEnabled(options, [onSuccess], [onError]) iOS: Checks if the Notifications are enabled for this Application in the Device's Notification Center.
Windows Phone: Checks if the Application has an active opened Channel for communication with the Notification Service. Not relying on the device notification settings.
Android: Checks if the Application has established connection with the Notification Service. Not relying on the device notification settings.
clearBadgeNumber() Promise Resets the badge number on the Telerik Backend Services server to 0.
clearBadgeNumber([onSuccess], [onError]) Clears the badge number on the server by setting it to 0
currentDevice([emulatorMode]) CurrentDevice Returns the current device for sending push notifications
ensurePushIsAvailable() Ensures that the Telerik Push Notifications plug-in has been loaded and is ready to use. An {EverliveError} is returned if the plug-in is not available.
getRegistration() Promise Returns the push notifications registration for the current device.
getRegistration([onSuccess], [onError]) Returns the push registration for the current device.
notificationProcessed() Currently available only for iOS
Use this method in case you are working with iOS interactive push notifications in background mode, including TextInput, or iOS silent push notifications
Call it once you are done with processing your push notification in notificationCallbackIOS.
notificationProcessed() Currently available only for iOS
Use this method in case you are working with iOS interactive push notifications in background mode, including TextInput, or iOS silent push notifications
Call it once you are done with processing your push notification in notificationCallbackIOS.
notificationProcessed() Use this method in case you are working with iOS interactive push notifications in background mode, including TextInput, or iOS silent push notifications
Call it once you are done with processing your push notification in notificationCallbackIOS.
notificationProcessed() Currently available only for iOS
Use this method in case you are working with iOS interactive push notifications in background mode, including TextInput, or iOS silent push notifications
Call it once you are done with processing your push notification in notificationCallbackIOS.
register(settings, [success], [error]) 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.
register(settings) Promise 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.
send(notification, [onSuccess], [onError]) Sends a push message
send(notification) Promise Sends a push notification.
setBadgeNumber(badge) Promise Sets the badge number on the Telerik Backend Services server.
setBadgeNumber(badge, [onSuccess], [onError]) Sets the badge number on the server
unregister() Promise Disables push notifications for the current device. This method invalidates any push tokens that were obtained for the device from the current application. The device will also be unregistered from Telerik Backend Services.
unregister([onSuccess], [onError]) Disables push notifications for the current device. This method invalidates any push tokens that were obtained for the device from the current application. The device will also be unregistered from Telerik Backend Services.
This method invalidates any push tokens that were obtained for the device from the current application.
The device will also be unregistered from Telerik Backend Services.
updateRegistration(customParameters, [onSuccess], [onError]) Updates the registration for the current device.
updateRegistration(customParameters) Promise Updates the registration of the current device.
Contact us: +1-888-365-2779
sales@telerik.com
Copyright © 2016-2017, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.