
| Name | Description | Type | Use |
|---|---|---|---|
| callback | Passed to verify the status of registration. | undefined |
required |
The PushNotifications listener's callback can be structured as follows:
{
onRegistrationSucceeded: function(token) { ... },
onRegistrationFailed: function({failureType}) { ... }
}| 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. |