AdMob Android adapter v22.214.171.124-early1 is compatible with Vungle Android SDK v6.9.1-early1 and has been tested for compatibility with Google Android SDK v19.5.0. Refer to AdMob's documentation for integrating AdMob Mediation with the Vungle SDK in AdMob's Guides section, Integrating Vungle with Mediation, as a supplement for information about new features that are yet to be covered by the official documentation.
Refer to instructions for Android Studio integration and manual integration in AdMob's integration guide, "Step 3: Import the Vungle SDK and Adapter," at https://developers.google.com/admob/android/mediation/vungle#step_3_import_the_vungle_sdk_and_adapter.
If you are updating to Vungle Android SDK v6 using the Google Mobile Ads SDK, you must use Google Play Services Ads 12.0.0 or higher because we have added the
onRewardedVideoCompleted() callback method to
RewardedVideoAdListener. For more information, refer to the Google Mobile Ads SDK Release Notes.
As of July 1, 2020, California Consumer Privacy Act (CCPA) will be enforced and publishers must update to Android SDK 6.7.0 and AdMob adapter 126.96.36.199 to comply with CCPA.
To pass CCPA values, you must call the Vungle SDK API directly. This is the only feature that should be accessed directly through Vungle SDK API. Other optional features such as Android ID and memory settings should use
Vungle.updateCCPAStatus to set the user’s consent status to specify that the user has opted out by passing
Vungle.CCPAStatus.OPTED_OUT. And use
Vungle.getCCPAStatus to get the current CCPA status for the particular user.
public static void updateCCPAStatus(@NonNull final Vungle.CCPAStatus status)
public static Vungle.CCPAStatus getCCPAStatus()
// To set the user's CCPA status to opted out: Vungle.updateCCPAStatus(Vungle.CCPAStatus.OPTED_OUT); // To find out what the user's current consent status is: Vungle.CCPAStatus currentCCPAStatus = Vungle.getCCPAStatus();
Starting with Vungle SDK v6.5.1, Vungle supports AdMob’s banner ads. To display a banner ad in the application, create an MREC or banner placement in the Vungle dashboard and configure it to a banner ad unit in the AdMob dashboard. Note that the MREC (300dp x 250dp) format must have its own, separate placement reference ID. An MREC format must be configured as 'MREC' in the Vungle dashboard, as opposed to the way that multiple banner sizes can all be configured under the same placement ID as 'banner'.
Supported banner sizes:
|Size in dp (WxH)||Description||AdSize constant|
|300x250||IAB Medium Rectangle||MEDIUM_RECTANGLE|
|Provided width x Adaptive height||Adaptive banner||N/A|
|Screen width x 32|50|90||Smart banner||SMART_BANNER|
AdView adView = new AdView(this); adViews.add(adView); adView.setAdSize(AdSize.MEDIUM_RECTANGLE); adView.setAdUnitId(<AdUnit>);
Multiple Banner Load
Vungle Android SDK 6.5.x supports loading one banner ad for a placement ID at any given time, and one placement ID is mapped to one AdMob ad unit ID. This limits the ability to successfully load subsequent
loadAd requests when a banner ad is already loaded by Vungle SDK. To overcome this limitation, pass a unique identifier (which can be a random number generated or simple incremental number) for each banner
loadAd so that the request can fall back to the next ad network in the waterfall when the Vungle SDK already has a banner ad loaded.
Bundle extras = new VungleExtrasBuilder(null).setBannerUniqueRequestID("12345").build(); AdRequest adRequest = new AdRequest.Builder().addNetworkExtrasBundle(VungleInterstitialAdapter.class, extras).build(); adViewBanner.loadAd(adRequest);
The Vungle AdMob adapter continues to support network-specific parameters as shown on AdMob's guide. Starting with Vungle SDK v6.5.1, the audio setting for video play has been replaced by
setStartMuted, which takes a boolean;
setSoundEnabled has been deprecated. The adapter also supports an additional parameter,
setAdOrientation, to play the ad following the device orientation setting, which takes an
AdConfig object with
MATCH_VIDEO configurability; (
setAutoRotate has been deprecated)
Bundle localExtras = new VungleExtrasBuilder(null) .setAdOrientation(AdConfig.LANDSCAPE) .setStartMuted(true) .setUserId("vungle-test-user") .setOrdinalViewCount(77777) .build();
For rewarded ads, pass
addNetworkExtrasBundle, and pass
VungleInterstitial.class for interstitial ads.
Sample code for loading rewarded ads:
mRewardedAd.loadAd(new AdRequest.Builder() .addNetworkExtrasBundle(VungleAdapter.class, localExtras) .build(), adLoadCallback);
Sample code for loading interstitial ads:
mInterstitialAd.loadAd(new AdRequest.Builder() .addNetworkExtrasBundle(VungleInterstitialAdapter.class, localExtras) .build());
Starting with Vungle SDK v6.4.11, you can prevent the SDK from requesting ads or even initializing if the storage of your Android phone falls below a predefined threshold. If this happens, you will get an error similar to the following:
There is not enough file system size on the device.
//Integer value sets the required minimum available free storage space to be able to initialize the SDK
//Integer value sets the required minimum available free storage space to be able to request an ad
Starting with Vungle SDK v6.4.11, publishers can now restrict from passing Android ID from the device to the SDK.
New Rewarded API
As documented in the AdMob instruction guide, v17.2.0 and higher supports caching multiple rewarded ads at the same time. Because Vungle does not support this feature, the ad request for the second load attempt cannot be filled by Vungle; rather, it is passed to the next ad network in the waterfall.
We recommend that you use cache optimized placement if you want to have more than one ad cached, because an ad request is automatically made at the time of ad play, and the next ad is very likely to be ready for play by the time the previous ad experience ends.