Skip to main content

RegisterPush/UnregisterPush

AndroidiOS
If you were looking for the method for use with Unreal Engine, see RegisterPush for Unreal Engine SDK.

Register for Firebase push notifications to receive messages from the Firebase channel. Link an account to the linked device so that the game can push notifications to the specified account in the background.

note

Messages can no longer be received after the UnregisterPush method is called to cancel message push, please use with caution.

Function definition

// Register push
public static void RegisterPush(string channel, string account = "");

// Unregister push
public static void UnregisterPush(string channel);

Input parameters

ParameterTypeDescription
channelstringThe channel to push notifications.
"INTLChannel.Firebase"
accountstringThe linked account.
Linking enables notifications to be pushed to the specified account. The account value cannot be single characters such as “2” or “a”.

Observers

The callback processing interface is PushBaseResultObserver. The callback data structure is BaseResult.

The callback methodID is INTL_PUSH_REGISTERINTL_PUSH_UNREGISTER.

Code sample

// Register push
INTLAPI.RegisterPush(INTLChannel.Firebase);

// Unregister push
INTLAPI.UnregisterPush(INTLChannel.Firebase);