Integrate with AdMob

If you already have AdMob ads serving in your app, you can integrate AwesomeAds without having to use the AwesomeAds Publisher SDK directly.

If using SuperAwesome Unity version 8.5.5 onwards

Add the AdMob plugin

For both iOS and Android, uncomment the AdMob dependency in the Assets/SuperAwesome/Editor/SuperAwesomeDependencies.xml file for <androidPackages> and <iosPods>. Once this is done, you will need to resolve the Android dependencies again, in the main tool bar, go to Assets > External Dependency Resolver > Android Resolver > Resolve. After this, follow on from step Set up AdMob Mediation Groups

superawesomedependencies.xml

If using SuperAwesome Unity version 8.5.4 and below

Add the AdMob plugin

Download version 8.5.4 or older of the SuperAwesomeAdMob Publisher SDK from this page.

Mulitdex support

You may find you get an error relating to The number of method references in a .dex file cannot exceed 64k API 17 if you do, you will require Multidex support.
To enable this, the use of a modified launcherTemplate.gradle file in Assets/Plugins/Android will be required.

You will need to export the android project and copy the contents of launcher/build.gradle into Assets/Plugins/Android/launcherTemplate.gradle within your Unity project, we do not supply this as it will vary depending on the Unity editor you are using.

Add:

dependencies {
   implementation 'androidx.multidex:multidex:2.0.1'
}

Within android { ... } and then re-export or build and run your Android project.

More info on this can be found here.

Set up AdMob Mediation Groups

Next, you need to set up a Mediation Group for each type of AdMob ad that you wish to display: banner, interstitial, and video.

Implement AdMob ads

To implement the ads, see the official AdMob Unity guidelines.

Use Resolver to download dependencies

SuperAwesomeAdMob SDK internally uses the External Dependency Manager.

To download the necessary Android dependencies:

  1. Open the Unity Editor.
  2. From the main menu, select Assets > External Dependency Manager > Android Resolver > Force Resolve.

Customize the experience

Make your customizations to the video or interstitial ad:

// Optional config
SAVideoAd.enableCloseButton();
SAVideoAd.enableParentalGate();
SAVideoAd.enableBackButton();

Then call applySettings just before you call the Show method:

SAVideoAd.applySettings();
this.rewardedAd.Show();