Skip to main content

PushBaseResultObserver

If you were looking for the method for use with Unity, see PushBaseResultObserver for Unity SDK.

Register the callback of the Player Network SDK Push module, the game needs to process the callback function. For more information on the callback data structure, see BaseResult.

note

It is strongly recommended to perform registration in the startup function of the game application.

Function definition

C++ event handling (above V1.15)

//configure callback
void SetPushBaseResultObserver(FINTLPushBaseEvent& callback);
//get callback
FINTLPushBaseEvent& GetPushBaseResultObserver();

Unreal Engine event handling

UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnPushBaseResult(FINTLBaseResult ret);
virtual void OnPushBase_Implementation(FINTLBaseResult ret) {};

Code sample

C++ event handling (above V1.15)

//configure callback
FINTLPushBaseEvent pushBaseEvent;
pushBaseEvent.AddUObject(this, &OnPushBase_Implementation);
UINTLSDKAPI::SetPushBaseResultObserver(pushBaseEvent);
// Remove callbacks
UINTLSDKAPI::GetPushBaseResultObserver().Clear();
void OnPushBase_Implementation(FINTLBaseResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}

Unreal Engine event handling

void OnPushBase_Implementation(FINTLBaseResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}