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 API to deregister message push, you will no longer receive messages. Please consider calling it as appropriate.
Function Definition
// Register push notifications
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool RegisterPush(const FString channel, const FString Account = "");
// Unregister push notifications
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool UnregisterPush(const FString Channel);
Input Parameters
| Parameters | Type | Explanation |
|---|---|---|
| Channel | FString | Channel Definition "Firebase" |
| Account | FString | Bound account Once bound, push messages can be sent to the account; account cannot be single characters like “2”, “a” |
Callback processing
The callback handler interface is PushBaseResultObserver.The callback data structure is BaseResult.
The callback IDs are kMethodIDPushRegister and kMethodIDPushUnregister.
Code example
// Register push notifications
UINTLSDKAPI::RegisterPush("Firebase");
// Unregister push notifications
UINTLSDKAPI::UnregisterPush("Firebase");