Programmatically close interstitial ad

I want to make sure that interstitial ads on android using android admob sdk can be closed? After some searching, it seems to me that this is impossible because the ad is a separate activity. what I want to do is close the ad after 5 seconds. Can someone assure me that closing an interstitial ad is not possible and if there is another hack?

+6
source share
2 answers

This will be a very late answer, but I ran into a similar problem. The trick may be to programmatically call the back button event.

this.dispatchKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_BACK));

As soon as you click the back button, the interstitial ad closes, so turning on the back button will ultimately close the ad. Rest depends on requirements.

+8
source

Unable to close interstitial programmatically.

+1
source

All Articles