requesting a new ad in onAdFailedToLoad is a good practice or not?

579 views
Skip to first unread message

Purple Phoenix

unread,
Oct 15, 2014, 2:19:29 PM10/15/14
to google-adm...@googlegroups.com

I am using Admob and following code in my app with admob. i want to know is this a good practice or not. as you can see my fill rate is very low.

adView.setAdListener(new AdListener() {
            @Override
            public void onAdFailedToLoad(int errorCode) {
                super.onAdFailedToLoad(errorCode);
                adView.loadAd(new AdRequest.Builder().build());
            }
});
 
admob.png

Eric Leichtenschlag

unread,
Oct 15, 2014, 6:59:03 PM10/15/14
to google-adm...@googlegroups.com
Hello,

I wouldn't recommend doing this, since if a user consistently isn't getting ads for some reason (slow connection, in airplane mode, etc), you'll have an infinite loop of the SDK trying to request ads. That could be contributing to inflated requests and lower fill rates.

If the Android SDK can't get any response back the first time, it will by default refresh every 60s until it gets a response. At that point, your refresh rate you specified on the AdMob website will be used going forward. This means you don't have to automatically kick off your own refresh - you can wait for the SDK to do it for you at a reasonable rate.

Thanks,
Eric

Purple Phoenix

unread,
Oct 16, 2014, 12:24:56 AM10/16/14
to google-adm...@googlegroups.com

Thanks Eric.
My app only works if there is internet connectivity ,
If i Remove this code  will it increase my earnings?

Eric Leichtenschlag

unread,
Oct 16, 2014, 7:35:18 PM10/16/14
to google-adm...@googlegroups.com
I'm not sure it'll have much affect on earnings. Should decrease requests, and increase fill rate though.
Reply all
Reply to author
Forward
0 new messages