unregisterFromRemoteNotifications

This front call unregisters the mobile device from push notifications.

Syntax

ui.Interface.frontCall("mobile","unregisterFromRemoteNotifications",
   [ sender_id ], [] )
  1. sender_id - For GMA, the sender_id identifies the mobile device. It's obtained when you create a GCM project. This parameter is ignored by GMI.

Usage

The "unregisterFromRemoteNotifications" front call unregisters the device from push notifications after it has been registered with the registerForRemoteNotifications front call.

On Android with GCM, to unregister the mobile device from GCM push notifications, pass the sender_id used to identify the GCM client. You obtain the sender_id when you create the GCM project.

On iOS with APNs, provide a NULL as sender_id, to unregister the iOS mobile device from push notifications.

Example

DEFINE sender_id STRING
...
IF get_device_type() == "GMA" THEN
   LET sender_id = "94019931415" -- Got from GCM project creation
ELSE
   LET sender_id = NULL -- Ignored by GMI
END IF

CALL ui.Interface.frontCall(
        "mobile", "unregisterFromRemoteNotifications", 
        [ sender_id ], [ ] )
...