This sample is trying to run its own mediation layer, by simultaneously requesting ads from two networks and trying to figure out which one to show. Instead of writing this code yourself, the AdMob SDK supports
mediation right out of the box. All you have to do is go to
mediation.admob.com and create a mediation placement with AdMob and InMobi and configure their request priorities, and include the AdMob SDK, InMobi SDK, and InMobi
adapter into your project. Then, just use the mediation placement ID instead of your AdMob publisher ID when making ad requests to AdMob, and we'll handle all the network transitions for you.