PushResultObserver
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 PushResult.
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 SetPushResultObserver(FINTLPushEvent& callback);
//get callback
FINTLPushEvent& GetPushResultObserver();
Unreal Engine event handling
UFUNCTION(BlueprintNativeEvent, BlueprintCallable, Category = "INTLSDKObserver")
void OnPushResult(FINTLPushResult ret);
virtual void OnPushResult_Implementation(FINTLPushResult ret) {};
Code sample
C++ event handling (above V1.15)
//configure callback
FINTLPushEvent pushEvent;
pushEvent.AddUObject(this, &OnPushResult_Implementation);
UINTLSDKAPI::SetPushResultObserver(pushEvent);
// Remove callbacks
UINTLSDKAPI::GetPushResultObserver().Clear();
void OnPushResult_Implementation(FINTLPushResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}
Unreal Engine event handling
void OnPushResult_Implementation(FINTLPushResult ret)
{
UE_LOG(LogTemp, Warning, TEXT("MethodID: %d"), ret.MethodId);
}