With the release of version 3.16.0 of the Interactive Media Ads SDK (IMA SDK) for Android, the location where we host the SDK has changed to Google's Maven Repository.
As a result of this change, your Android project should include a reference to the
google() repository (Google's Maven Repository) as a dependency. Previously, the SDK was hosted on JCenter. You can now remove the
jcenter() reference from your Android project’s
build.gradle file, as long as none of your other dependencies are hosted there.
google() repository should be referenced in the project-level
build.gradle file of your project. You should then import the IMA SDK in the
app/build.gradle file. See an example in the following code snippet from the Adding the IMA Android SDK to the player app section of the Android IMA SDK getting started guide.
Another change that comes from this update is that the
com.google.android.gms:play-services-ads-identifier target is now included as a dependency of the IMA SDK and is no longer required to be explicitly included in the
If you have questions about the IMA SDK for Android, please see the SDK documentation, or reach out to us on the IMA SDK forum.
In today’s mobile-first world, app publishers who use banner ads must serve them across a greater variety of screen sizes and layouts than ever before. Existing responsive banner ad formats often produce ads that are too small and not optimally tailored to the specifications of each device.
To address this, we’ve created a new banner type called adaptive anchor banners. These banners dynamically adjust creative size to deliver an ad that is ideally sized across all of your user’s devices, without the need to write any custom code.
These banners are designed to replace standard 320x50 and leaderboard banner sizes, as well as smart banners. Here is a comparison of the 3 formats on a standard mobile device:
Standard banner vs. smart banner vs. AdMob’s adaptive anchor banner
Migrating your banner implementation to adaptive
Here are a few simple steps to update your banner implementation to use adaptive banners:
- Ensure your UI supports a variable height banner. Depending on what constraints or layout mechanism you are using to position your banner, you may need to remove height constraints such that the layout accepts variable content size.
- For Android this can be done using
- For iOS constrain your banner in terms of X and Y positions, you may also give it a width constraint, but ensure any height constraint or content size is placeholder only.
Note that the max height is 15% of the device height or 90px, whichever is smaller.
- Use the adaptive banner ad size APIs to get an adaptive ad size. The adaptive ad size APIs are available for different orientations.
Which one you use depends on your use case. If you want to preload ads for a given orientation, use the API for that orientation. If you only need a banner for the current orientation of the device, use the current orientation API.
Once you have an ad size, set that on your banner view as usual before loading an ad. The banner will resize to the adaptive ad size as long as you have laid it out without any conflicting constraints.
- Update your mediation adapters. If you use mediation, update your mediation adapters to the latest version. All open source mediation adapters that support banners have been updated to support the adaptive banner ad size requests. Note that adapters will still only return ad sizes supported by their corresponding ad network SDK, and those ads will be centered in your adaptive banner view.
Review our developer resources
For further information including detailed implementation guidance, review our developer resources:
As always, please reach out on our developer forum if you have any questions.