queryNotificationAllowed

This API tells that the user has allowed the device to display notification.

Example Usage:

Gamebase.Push.queryNotificationAllowed(context, (isAllowed, exception) -> {
    if (Gamebase.isSuccess(exception)) {
        if (isAllowed) {
            // The user allowed notification.
        } else {
            // The user blocked notification.
        }
    } else {
        // Failed to check device setting.
    }
});

Since

Added 2.34.0.

Parameters

context

Application context. The activity is OK, too.

callback

The result.

See also