queryNotificationAllowed
open fun queryNotificationAllowed(@NonNull context: Context, @NonNull callback: GamebaseDataCallback<Boolean>)
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.
}
});
Content copied to clipboard
Since
Added 2.34.0.
Parameters
context
Application context. The activity is OK, too.
callback
The result.