Function called by the application to register notification types to receive.
<static> registerForNotificationTypes( types, successCallback, errorCallback, notificationlistenerfunc, [senderId] )
| Name | Type | Argument | Description |
| types | string | Types of notifications the application wants to receive.The different types of notifications are expressed in <code>notificationType</code> Notificaion types allowed are Disable all notifications (NONE: 0), Set badge count on app icon (BADGE: 1), Play sounds on receiving notification (SOUNDS: 2) and Show alert on receiving notification (ALERT: 4). | |
| successCallback | string | Success callback to call when registration is successful. | |
| errorCallback | string | Error callback to call when registration attempt fails. | |
| notificationlistenerfunc | string | The function that receives the notification for processing by the application. | |
| senderId | string | (optional) | The sender ID that is used for GCM registration.For other platforms it is null. |
regid = "211112269206";
function registerSuccess(mesg){}
function registerFailure(mesg) {}
function ProcessNotification(mesg){}
sap.Push.registerForNotificationTypes(sap.Push.notificationType.badge | sap.Push.notificationType.sound | sap.Push.notificationType.alert, registerSuccess, registerFailure, ProcessNotification, regid);