The logic of when or whether or not to grant a reward is controlled within your app, and AppLovin provides a few callbacks to help you determine whether or not to grant a reward.
The most relevant callbacks for rewarding users are Reward Verification Callback and Video Completed Callback.
Reward Verification Callback
When you make a request to show a rewarded video the AppLovin SDK will verify the user against fraud, and check if they are valid for a reward from our perspective. If the user passes the verification successfully, AppLovin notifies your app using a callback:
Android | userRewardVerified |
---|---|
iOS | didSucceedWithResponse |
Unity | onAppLovinEventReceived called and ev contains "REWARDAPPROVEDINFO" |
Video Completed Callback
In addition, when the video completes, AppLovin notifies your app using a callback:
Android | videoPlaybackEnded with fullyWatched == true |
---|---|
iOS | videoPlaybackEndedInAd with wasFullyWatched == YES |
Unity | onAppLovinEventReceived called and ev contains "VIDEOSTOPPED" and was not called with ev containing "USERCLOSEDEARLY" |
Make sure to distinguish between completion of rewarded videos and video interstitials (non-incentivized interstitials).
One possibility is rewarding the user if the reward was verified for this video play, but only upon completion of the video. For this method you can set a boolean flag to indicate that the reward was verified, and check its value upon video completion.