Gamebase SDK for Unity 2.69.0
Toast Gamebase Platform
Loading...
Searching...
No Matches

◆ QueryNotificationAllowed()

static void QueryNotificationAllowed ( GamebaseCallback::GamebaseDelegate< bool > callback)
static

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

Since
Added 2.34.1.
Parameters
callbackCallback pass to API result.

Example Usage :

public void QueryNotificationAllowedSample()
{
Gamebase.Push.QueryNotificationAllowed((isAllowed, error)=>
{
if (Gamebase.IsSuccess(error) == true)
{
if (isAllowed == true)
{
// The user allowed notification.
}
else
{
// The user blocked notification.
}
}
else
{
// Failed to check device setting.
}
});
}
static void QueryNotificationAllowed(GamebaseCallback.GamebaseDelegate< bool > callback)
This API tells that the user has allowed the device to display notification.
Definition Gamebase.cs:2812
The Push class provides registering push token API to ToastCloud Push Server and querying push token ...
Definition Gamebase.cs:2581
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition Gamebase.cs:57
The Gamebase class is core of Gamebase service.
Definition Gamebase.cs:11