How to automatically close admob interstitial ad if users click the Android home button?

1,417 views
Skip to first unread message

Andy Shiue

unread,
Aug 4, 2013, 11:05:46 AM8/4/13
to google-adm...@googlegroups.com
I was using the interstitial ad from Admob in my android app. The interstitialAd.show() is called at certain events of the app. Everything worked fine but one annoying use case with the ad.

If users click HOME while the ad is displaying or the ad activity (i.e. users click the ad) is active, the ad or the ad activity will be displayed after switching back to the app. I would prefer that the app is displayed (i.e. the main activity is at the top of the activity stack) since it looked confusing to the users seeing the ad first.

I tried to trap all the activity callbacks (such as onStart(), onResume() ...), but apparently the app will never become foreground in this use case. Since the ad activity is started by calling interstitialAd.show(), the tricks I know on managing the activity stack does not help, either.

Does anyone know how to automatically close the ad and return the app main activity to the top in this case?

Thanks.

Eric Leichtenschlag

unread,
Aug 14, 2013, 7:12:03 PM8/14/13
to google-adm...@googlegroups.com
Hi Andy,

It is intended behavior that an interstitial requires explicit closing by the user.

Thanks,
Eric
Reply all
Reply to author
Forward
0 new messages