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

◆ QueryTokenInfo()

static void QueryTokenInfo ( GamebaseCallback::GamebaseDelegate< GamebaseResponse::Push::TokenInfo > callback)
static

Get push settings from the the push server.

Since
Added 2.15.0.
Parameters
callbackCallback pass to API result.

Example Usage :

public void QueryTokenInfoSample(bool isSandbox)
{
Gamebase.Push.QueryTokenInfo((data, error)=>
{
if (Gamebase.IsSuccess(error) == true)
{
// Succeeded.
bool enablePush = data.agreement.pushEnabled;
bool enableAdPush = data.agreement.adAgreement;
bool enableAdNightPush = data.agreement.adAgreementNight;
string token = data.token;
}
else
{
// Failed.
}
});
}
static void QueryTokenInfo(GamebaseCallback.GamebaseDelegate< GamebaseResponse.Push.TokenInfo > callback)
Get push settings from the the push server.
Definition Gamebase.cs:2751
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