Skip to main content

RegisterPush/UnregisterPush

AndroidiOS
If you were looking for the method for use with Unity, see RegisterPush for Unity 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
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

ParameterTypeDescription
ChannelFStringThe channel to push notifications.
“Firebase"
AccountFStringThe 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 kMethodIDPushRegisterkMethodIDPushUnregister.

Code sample

// Register push
UINTLSDKAPI::RegisterPush("Firebase");

// Unregister push
UINTLSDKAPI::UnregisterPush("Firebase");