Rewarded Ads

Rewarded Video Ads are similar to Interstitials, but the video Ad will be played on the full-screen banner.

You can find the official Google Get Started guide for AdMob publishers here. You will find the basic information about the Rewarded Video Ads with AdMob useful for the developers at the very beginning of Ads integration.

The best way is to use the Google AdMob Rewarded Video Ads with AdMob Mediation. There are a few steps to begin with AdMob Mediation. Firstly, you have to configure your Google AdMob Developer Console and provide all the 3rd party settings for the Ads networks you are going to use. Secondly, you have to add compatible Unity SDK for certain Ads network and mediation adapter. You can find all the detailed official step-by-step Google documentation about Mediation Networks configuration here.

For now, Google Mobile Ads plugin supports the Rewarded Video Ads for Android platform only. iOS platform support will be added with future plugins updates.

All the basic setup and Google Mobile Ad initialization are still the same as for banners and interstitials. So, let's move directly to the Rewarded Video implementation.

You have to start with the Rewarded Video loading request at the start of your application. The code snippet below shows the implementation

void Start() {
    GoogleMobileAd.OnRewardedVideoLoaded += HandleOnRewardedVideoLoaded;
	GoogleMobileAd.OnRewardedVideoAdClosed += HandleOnRewardedVideoAdClosed;

	GoogleMobileAd.Instance.LoadRewardedVideo();
}

Please, pay your attention, that the subscriptions to the Rewarded Video static events go before the load rewarded video request. That's an important thing and you should take it into an account.

The full list of Rewarded Video Ads events is following

public static event Action<string, int> OnRewarded             = delegate {};
public static event Action OnRewardedVideoAdClosed             = delegate {};
public static event Action<int> OnRewardedVideoAdFailedToLoad  = delegate {};
public static event Action OnRewardedVideoAdLeftApplication    = delegate {};
public static event Action OnRewardedVideoLoaded               = delegate {};
public static event Action OnRewardedVideoAdOpened             = delegate {};
public static event Action OnRewardedVideoStarted 	            = delegate {};
  • OnRewardedVideoLoaded - Called when a rewarded video ad is loaded.
  • OnRewardedVideoAdFailedToLoad - Called when a rewarded video ad request failed. int value is the error code.
  • OnRewardedVideoAdLeftApplication - Called when a rewarded video ad leaves the application (e.g., to go to the browser).
  • OnRewardedVideoAdClosed - Called when a rewarded video ad is closed.
  • OnRewardedVideoAdOpened - Called when a rewarded video ad opens an overlay that covers the screen.
  • OnRewardedVideoStarted - Called when a rewarded video ad starts to play.
  • OnRewarded - Called when a rewarded video ad has triggered a reward. The app is responsible for crediting the user with the reward. That's the most important callback event, which is called when the user should be rewarded for watching a video. string parameter will contain the rewarded item id and the int will contain the amount of rewarded items. All these values are from your Google AdMob Developer Console setup.

When your Rewarded Video Ad will be loaded and ready to be shown, you will receive OnRewardedVideoLoaded  callback.

To display the Rewarded Video Ad, call ShowRewardedVideo method as shown below

private void ShowRewardedVideoAd () {
	GoogleMobileAd.ShowRewardedVideo();
}

The extended example of Rewarded Video Ads features you can find in the Google Mobile Ads Example scene.