问题
I want to know what is the right paradigm for Admob mediation.
so far, I've got a normal AdView banner.
this is how think it should work:
- onFailedToReceiveAd - catch this event which mean admob cannot supply ads.
- create new AdView banner with the mediation id and make it VISIBLE
so, is this the best practice?
create two banners. one with the "regular" publisher ID
and the other one, with the mediation ID
回答1:
The correct approach is:
- Create a banner with a Mediation ID.
- When configuring that mediation placement on admob.com, configure AdMob as one of your ad networks within that mediation placement. If you want AdMob to be requested first every time, use an eCPM ordering and give AdMob the highest eCPM value.
This way, Mediation will always request an AdMob ad first. If it fails, Mediation will automatically try your next network for you. This saves you from having to do this retry logic on your own. onFailedToReceiveAd
will only be invoked if all ad networks failed to return an ad.
来源:https://stackoverflow.com/questions/11798450/admob-mediation-publisher-id-vs-mediation-id