Follow

Showing Rewarded Video Ads

View original article on our GitHub.

Rewarded Ads are interstitial video ads that provide a reward to the user in exchange for watching an entire video ad. The reward might be in-app goods, virtual currency or any premium content provided by the application. Because users actually opt-in to watch a rewarded video and are granted with something valuable in return, Rewarded Ads are an effective and clean monetization solution for stronger user retention and keeping users engaged in your application for a longer amount of time.

In order to show a Rewarded Ad, follow the following steps:
1. Inside your Start() method, declare a video listener and load the rewarded video ad:

#if UNITY_ANDROID
videoListener = new VideoListenerImplementation ();
StartAppWrapper.setVideoListener (videoListener);
StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO);
#endif

2. Implement the videoListener in order to get a callback when the user completes watching the video and is eligible for getting the reward:

#if UNITY_ANDROID
public class VideoListenerImplementation : StartAppWrapper.VideoListener {
   public void onVideoCompleted() {
      // Grant user with the reward
   }
}
#endif

3. Show the ad

#if UNITY_ANDROID
StartAppWrapper.showAd();
StartAppWrapper.loadAd(StartAppWrapper.AdMode.REWARDED_VIDEO);
#endif

IMPORTANT: Loading an ad might take a few seconds especially in the case of a video, so it's important not to show the ad immediately after loading it. In case you call showAd() while the ad hasn't been successfully loaded yet, nothing will be displayed. It is recommended to use the "onReceiveAd" callback which is triggered when an ad was loaded and ready to use (see Adding a Callback when an Interstitial Ad is loaded).

Was this article helpful?
0 out of 2 found this helpful
Have more questions? Submit a request

Comments