register


Purpose

Registers the application so that it can receive push notifications.

Signature

register( callback )

Returns

This method does not return anything.

Parameter

Name Description Type Use
callback Passed to verify the status of registration. undefined required

Callback structure

The PushNotifications listener's callback can be structured as follows:

{
  onRegistrationSucceeded: function(token)  { ... },
  onRegistrationFailed: function({failureType}) { ... }
}

Methods

Name Description Return type
onRegistrationSucceeded Called if the registration is successful. It passes a registration token. On iOS it is a hex string, while on Android it is raw string value retrieved from GCM servers. undefined
onRegistrationFailed

Called if an error occurs. It passes the following object:

{ code, description }

Possible failure types are listed in the Constants table, in the PushNotifications article.

Related topics

PushNotifications
Legal notice | Copyright © 2017 and Confidential to Pegasystems Inc. All rights reserved
PDN | Feedback
Advanced...