Gamebase SDK for Unity 2.69.0
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
pushConfigurationSettings of the notification.
callbackCallback 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));
}
});
}
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:2616
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