Push module callback (PushResultObserver)
Register the callback for the Player Network SDK Push module; the game needs to register the callback for processing.For more information on callback data structures, see PushResult.
note
It is strongly recommended that games register during the application start-up function.
Function definition
C++ Event Handling Method (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 example
C++ Event Handling Method (Above V1.15)
// Configure callback
FINTLPushEvent pushEvent;
pushEvent.AddUObject(this, &OnPushResult_Implementation);
UINTLSDKAPI::SetPushResultObserver(pushEvent);
// Clear callback
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);
}