RegisterPush/UnregisterPush
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
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool RegisterPush(const FString channel, const FString Account = "");
// Unregister push
UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static bool UnregisterPush(const FString Channel);
Input parameters
| Parameter | Type | Description |
|---|---|---|
| Channel | FString | The channel to push notifications. “Firebase" |
| Account | FString | 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 kMethodIDPushRegister,kMethodIDPushUnregister.
Code sample
// Register push
UINTLSDKAPI::RegisterPush("Firebase");
// Unregister push
UINTLSDKAPI::UnregisterPush("Firebase");