Built-in front calls / Genero Mobile common front calls |
This front call unregisters the mobile device from push notifications.
ui.Interface.frontCall("mobile","unregisterFromRemoteNotifications", [ sender_id ], [] )
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.
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 ], [ ] ) ...