Google Mobile Ad

The Google Mobile Ad API integration is the same as in the  Google Mobile Ads SDK plugin ( available at Assets Store and Union Assets )

It only has two differences:

1) you should use AndroidAdMobController instead of GoogleMobileAd(cross-platform) class. If you own both plugins, then, of course, use GoogleMobileAd class.

2)  Initialization.  For example, if with  GoogleMobileAd(cross-platform) plugin you are specifying your ad unit id's with the Plugin Editor UI, with Android Native, you need initialize Admob with your ad unit id's using scripting at your app start as shown in a code snippet below:

//replace with your ids
private const string MY_BANNERS_AD_UNIT_ID		 = "ca-app-pub-6101605888755494/1824764765";
private const string MY_INTERSTISIALS_AD_UNIT_ID =  "ca-app-pub-6101605888755494/3301497967";
private const string MY_REWARDED_VIDEO_AD_UNIT_ID =  "ca-app-pub-6101605888755494/5378283960";


//If you want to use Interstitial ad also, you need to set additional ad unit id for Interstitial as well
//If you want to use Rewarded Video Ads also, you need to set additional ad unit id for Rewarded Video as well
//listening events
AndroidAdMob.Client.OnInterstitialLoaded += OnInterstisialsLoaded; 
AndroidAdMob.Client.OnInterstitialOpened += OnInterstisialsOpen;

AndroidAdMobController.Instance.OnRewardedVideoLoaded += HandleOnRewardedVideoLoaded;
AndroidAdMobController.Instance.OnRewardedVideoAdClosed += HandleOnRewardedVideoAdClosed;

Banners are not clickable

If you click on the banner, and you don't have any activity after that, you need to check this line in Manifest:

<meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="true" />

The Value must be true. You can read more about manifest setting for an ad here.

API documentation can be found in the following articles:


An example of API use can be found under the AndroidGoogleAdExample.cs script.

Example Scene:

Plugins -> StansAssets -> Modules -> AndroidNative -> xExample -> Scenes -> AdMob -> GoogleAdExample