Gamebase SDK for Unity  2.2.1
Toast Gamebase Platform

◆ RegisterPush()

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

Register push information to the push server.

Since
Added 1.4.0.
Parameters
pushConfigurationSettings of the notification.
callbackCallback pass to API result.

Example Usage :

public void RegisterPush(bool pushEnabled, bool adAgreement, bool adAgreementNight)
{
GamebaseRequest.Push.PushConfiguration pushConfiguration = new GamebaseRequest.Push.PushConfiguration();
pushConfiguration.pushEnabled = pushEnabled;
pushConfiguration.adAgreement = adAgreement;
pushConfiguration.adAgreementNight = adAgreementNight;
Gamebase.Push.RegisterPush(pushConfiguration, (error) =>
{
if (Gamebase.IsSuccess(error))
{
Debug.Log("RegisterPush succeeded");
}
else
{
Debug.Log(string.Format("RegisterPush failed. error is {0}", error));
}
});
}