Gamebase SDK for Unity 2.75.1 Toast Gamebase Platform

Loading...
Searching...
No Matches

## ◆ RegisterPush() [1/2]

static void RegisterPush | ( | GamebaseRequest::Push::PushConfiguration | pushConfiguration,
|  | GamebaseCallback::ErrorDelegate | callback
| ) |  |
| static

With user's agreement to enablePush, enableAdPush, and enableAdNightPush, call following API to complete registration.

Since
  Added 1.4.0.

Parameters

  pushConfiguration | Settings of the notification.
  callback | Callback pass to API result.

Example Usage :

public void RegisterPushSample(bool pushEnabled, bool adAgreement, bool adAgreementNight)
{
var configuration = new GamebaseRequest.Push.PushConfiguration
{
pushEnabled = pushEnabled,
adAgreement = adAgreement,
adAgreementNight = adAgreementNight,
displayLanguageCode = GamebaseDisplayLanguageCode.Korean
};
Gamebase.Push.RegisterPush(configuration, (error) =>
{
if (Gamebase.IsSuccess(error) == true)
{
Debug.Log("RegisterPush succeeded.");
}
else
{
// Check the error code and handle the error appropriately.
Debug.Log(string.Format("RegisterPush failed. error is {0}", error));
}
});
}
Toast.Gamebase.Gamebase.Push.RegisterPush
static void RegisterPush(GamebaseRequest.Push.PushConfiguration pushConfiguration, GamebaseCallback.ErrorDelegate callback)
With user's agreement to enablePush, enableAdPush, and enableAdNightPush, call following API to compl...
Definition: Gamebase.cs:2645
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