I published my Application few days ago in Play Store, everything works perfectly, the Ads (Banner & Interstitial) were appearing as expected. But today, i discovered that the Interstitial Ads are appearing but not Banner ads. This is my first application and I don't know what may be the problem.
Asked
Active
Viewed 1,915 times
1 Answers
0
Sometimes ads are not shown due to lack of ads in google's ad inventory. You can check ad request response code to be sure.
mAdView.setAdListener(new AdListener() {
@Override
public void onAdLoaded() {
// Code to be executed when an ad finishes loading.
}
@Override
public void onAdFailedToLoad(int errorCode) {
// Code to be executed when an ad request fails.
Log.d("ADMOB_ERROR_CODE", "admob error code: " + errorCode);
}
@Override
public void onAdOpened() {
// Code to be executed when an ad opens an overlay that
// covers the screen.
}
@Override
public void onAdLeftApplication() {
// Code to be executed when the user has left the app.
}
@Override
public void onAdClosed() {
// Code to be executed when when the user is about to return
// to the app after tapping on an ad.
}
});
Further Reading: https://developers.google.com/admob/android/banner

minhazur
- 4,928
- 3
- 25
- 27
-
Shall I contact Admob? or just wait for this problem to be resolved? – Mr.Geek May 14 '18 at 09:17
-
Here is the result of this code: D/ADMOB_ERROR_CODE: admob error code: 3 – Mr.Geek May 14 '18 at 09:57
-
As I guessed. The error code means lack of inventory. https://stackoverflow.com/a/33712905/2797847 . When there are sufficient ads, the adview will show ads correctly. Just handle this case. – minhazur May 14 '18 at 09:59
-
This wont take a lot of time? because my revenue for today are 0.00 ! – Mr.Geek May 14 '18 at 10:07
-
It might take time. Sometimes it is device specific, it may show on mobiles but not on tablets. – minhazur May 14 '18 at 10:24
-
thanx a lot for your help. – Mr.Geek May 14 '18 at 10:34
-
@minhazur Ad not refresh after get error 3. Again Ad loaded only called loadAd(). Have any idea? – Sakthivel Appavu Oct 09 '18 at 11:55
-
@Sakthi If I understand you correctly, Admob ads can be unpredictable for some countries or regions based on ad inventory and their algorithm. – minhazur Oct 09 '18 at 13:44
-
@minhazur Thanks for ur response. I'm using DFP Banner(PublisherAdView) Ad, once failed not auto refreshed for next cycle. For my doubt if need to reload again? or automatically refreshed again. – Sakthivel Appavu Oct 10 '18 at 04:56
-
@minhazur Another one doubt, try for DFP mediation with FAN. I can't see FB ad using mediation. Instead-of directly i call FB ad means it can be visible. Guide me? – Sakthivel Appavu Oct 10 '18 at 05:01
-
@Sakthi Sorry, I can't help you with that as I haven't work on FAN. – minhazur Oct 10 '18 at 06:47
-
@minhazur Ok, I'm using DFP Banner(PublisherAdView) Ad, once loaded ad it will be auto refreshed every minute. But once failed not auto refreshed for next cycle. For my doubt if need to reload again? or automatically refreshed again. Thanks in advance. – Sakthivel Appavu Oct 10 '18 at 06:52