Register or Unregister Push (RegisterPush/UnregisterPush)
Register Firebase channel push notifications to receive messages from Firebase channels.On the basis of registered binding device, you can also bind the account to use a specified account, enabling push messages to be sent to the specified account via the backend.
note
After calling the UnregisterPush interface to deregister message push, you will no longer receive messages. Please consider carefully before calling.
Function Definition
// Register push notification
public static void RegisterPush(string channel, string account = "");
// Unregister push notification
public static void UnregisterPush(string channel);
Input Parameters
| Parameters | Type | Explanation |
|---|---|---|
| channel | String | Channel Definition "INTLChannel.Firebase" |
| account | string | Bound account Once bound, push messages can be sent to the account; account cannot be single characters like “2”, “a” |
Callback processing
The callback handling interface is PushBaseResultObserver.The callback data structure is BaseResult.
Callback IDs are INTL_PUSH_REGISTER and INTL_PUSH_UNREGISTER.
Code example
// Register push notification
INTLAPI.RegisterPush(INTLChannel.Firebase);
// Unregister push notification
INTLAPI.UnregisterPush(INTLChannel.Firebase);