I am trying to setup adMob ads. I have two questions:
1) Am I using adListener interface correctly? 2) How come I am unable to see ad Interstitials?
Lets start w
Last I looked at admob the interstitial ads were invite only. Meaning they would contact you if they felt your apps were a good fit with that type of advertising.
OK, several problems here.
1) No you are not using the AdListener interface correctly. Don't create your own interface. AdMob already supplies an AdListener interface. You do need to implement it however.
NB personally I would create an anonymous implementation of the AdListener instead of adding it to the Activity, but that's a design design for yourself.
Next you need to attach your listener to your AdView. So in your #onCreate
// load banner ads
adView.setAdListener(new AdListener() {
...
});
adView.loadAd(adRequestBanner);
2) You are unlikely to see any Interstitials with the code above because you are attempting to display immediately after requesting. It is extremely unlikely that an Interstitial has been downloaded in that short time frame. And in any case you really don't want to display an interstitial every time your Activity is created, it is a poor user experience.
Move your call to displayInterstitial() to some later point in your app life cycle, such at the end of a game session or between levels etc.