简体   繁体   中英

If admob mediation network doesn't serve ads go with alternative

Is it possible to go with alternative ad network if one of AdMob mediation networks does not serve ads?

Something like:

AdRequest request;
request = new AdRequest.Builder()
   .addNetworkExtrasBundle(AdColonyAdapter.class, AdColonyBundleBuilder.build())
   .build();
if (request == null){
 request = new AdRequest.Builder()
   .addNetworkExtrasBundle(Tapjoy.class, TapjoyBundleBuilder.build())
   .build();
}

rewardedInterstitialAd.loadAd(request);

I think you might be confused about how mediation works. When you make a request to AdMob for a mediated ad unit ID, the mobile ads SDK receives an ordered list of networks in response from the server. It then goes down the list, trying one network after another until it receives an ad. There's no need to pass empty extras classes as you're doing now.

Have a look at the mediation tutorial video for more information.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM