Gamebase SDK for Unity 2.74.0 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ QueryPush()

static void QueryPush | ( | GamebaseCallback::GamebaseDelegate< GamebaseResponse::Push::PushConfiguration > | callback | ) |
| static

Get push settings from the the push server.

Since
  Added 1.4.0.

Parameters

  callback | Callback pass to API result.

Example Usage :

public void QueryPushSample()
{
Gamebase.Push.QueryPush((pushAdvertisements, error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
Debug.Log("QueryPush succeeded.");
var message = new StringBuilder();
message.AppendLine(string.Format("pushEnabled:{0}", pushAdvertisements.pushEnabled));
message.AppendLine(string.Format("adAgreement:{0}", pushAdvertisements.adAgreement));
message.AppendLine(string.Format("adAgreementNight:{0}", pushAdvertisements.adAgreementNight));
message.AppendLine(string.Format("displayLanguageCode:{0}", pushAdvertisements.displayLanguageCode));
Debug.Log(message);
}
else
{
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("QueryPush failed. error is {0}", error));
}
});
}
Toast.Gamebase.Gamebase.Push.QueryPush
static void QueryPush(GamebaseCallback.GamebaseDelegate< GamebaseResponse.Push.PushConfiguration > callback)
Get push settings from the the push server.
Definition: Gamebase.cs:2682
Toast.Gamebase.Gamebase.Push
The Push class provides registering push token API to ToastCloud Push Server and querying push token ...
Definition: Gamebase.cs:2610
Toast.Gamebase.Gamebase.IsSuccess
static bool IsSuccess(GamebaseError error)
Return true if the GamebaseException object is null or the error code is zero.
Definition: Gamebase.cs:57
Toast.Gamebase.Gamebase
The Gamebase class is core of Gamebase service.
Definition: Gamebase.cs:11