Method signature
This method is available only for the Android platform
The method allows to get information on the status of the user’s subscription to mobile push notifications from the game.
We recommend to use this method to check if users can receive push notifications with the apps.sendGamePush method.
If the user is not subscribed to push notifications, you can offer them to enable push notifications with help of the FAPI.UI.suggestToEnablePushNotifications SDK method.
Call example
Callback example
As a result of launching the method, a callback with a notification on the status of the user’s subscription for notifications will be returned.
Callback example:
method: “getPushNotificationsStatus”
result: “ok”
data: “{"isGlobalEnabled":true,"isSubscriptionEnabled":true}”
The callback data contain information on the subscription status:
- isGlobalEnabled: if the user is subscribed to push notifications from an application on OK;
- isSubscriptionEnabled: if the user is subscribed to push notifications from a current game.
The user can receive push notifications only if both parameters are “true”.