[Android] Why interstitial ads always show multiple times in a row

481 views
Skip to first unread message

Kevin Ton

unread,
Dec 25, 2013, 10:06:17 PM12/25/13
to google-adm...@googlegroups.com
Hello,

My app has integrated with interstitial ads last month. But recent weeks many users complain that there are too many ads. The main problem is that the interstitial ads always show multiple times in a row. 

Could someone give any suggestion?

Below is my code:
----------------------------------------------------------------------------------------------------------------
public class MyActivity{
       ........

       @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
..........
showAds();
}

        private void showAds(){
            interstitial = new InterstitialAd(this, "sn");
   AdRequest adRequest = new AdRequest();
   interstitial.loadAd(adRequest);
   interstitial.setAdListener(new AdListener(){
@Override
public void onDismissScreen(Ad arg0) {
}

@Override
public void onFailedToReceiveAd(Ad ad, ErrorCode error) {
Log.e("Fail to receive ads: "+error);
}

@Override
public void onLeaveApplication(Ad ad) {
}

@Override
public void onPresentScreen(Ad ad) {
}

@Override
public void onReceiveAd(Ad ad) {
   if (ad == interstitial) {
     interstitial.show();
   }
}});
}
}
----------------------------------------------------------------------------------------------------------------

Thanks,
Kevin.

Kunal Verma

unread,
Dec 26, 2013, 1:56:58 AM12/26/13
to Google AdMob Ads Developers
Hi Kevin,
I am not sure if including interstitial.show(); in onReceiveAd is the right way. Maybe or maybe not this is causing the issue. What I have done is kept the onReceiveAd empty and to show an ad- included the code below:- ( after the AdListener)

if (interstitial.isReady()) {

        interstitial.show();

      }

The difference is my users don't complain about too many ads from a single session of app where I have loaded the ad once only. It shows as it is meant to that is one ad per one loadAd.( even after pause, start)

Have you seen multiple interstitials yourself?

Best,
Kunal



--
 
---
You received this message because you are subscribed to the Google Groups "Google AdMob Ads Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Kevin Ton

unread,
Dec 26, 2013, 10:44:51 AM12/26/13
to google-adm...@googlegroups.com
Hi Kunal,

Thanks for your suggestion.

The issue dose not always occur and it just occurs in some users. I will try your suggestion and will update the result.

Best,
Kevin.
To unsubscribe from this group and stop receiving emails from it, send an email to google-admob-ads-sdk+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages