RegisterPush/UnregisterPush
AndroidiOS
If you were looking for the method for use with Unreal Engine, see RegisterPush for Unreal Engine SDK.
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
| Parameter | Type | Description |
|---|---|---|
| channel | string | The channel to push notifications. "INTLChannel.Firebase" |
| account | string | The 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_REGISTER,INTL_PUSH_UNREGISTER.
Code sample
// Register push
INTLAPI.RegisterPush(INTLChannel.Firebase);
// Unregister push
INTLAPI.UnregisterPush(INTLChannel.Firebase);