Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't dismiss Admob Interstitial Ads by pressing Back key button of Android device

Tags:

android

admob

I am using latest Ads library ('com.google.android.gms:play-services-ads:19.3.0')

Recently, It is unable to close an Interstitial ads by pressing Back key button. I have to tap on "Close" button from Ads UI to dismiss the Ads.

Any body had same problem? Is it a new feature of Admob?

  MobileAds.initialize(this);
interstitialAd = new InterstitialAd(this);
interstitialAd.setAdUnitId("ca-app-pub-3940256099942544/1033173712");
interstitialAd.loadAd(new AdRequest.Builder().build());
tvTitle.setOnClickListener(v -> {
if (interstitialAd.isLoaded()) {
interstitialAd.show();
}
});
like image 974
CauCuKien Avatar asked Aug 13 '20 13:08

CauCuKien


People also ask

How do I get rid of interstitial ads on Android?

1. Should I Destroy() InterstitialAd after show? When you're finished using the Banner Ad or Interstitial Ad, make sure to call the Destroy() method before dropping the reference. For an Interstitial Ad, Interstitial object can be used only once, it should be destroyed after displaying the Ad.

How do I close an interstitial ad programmatically?

ACTION_DOWN, KeyEvent. KEYCODE_BACK)); As whenever you press on back button the interstitial ad is closed so firing the back button event will eventually close the interstitial ad.

How do I see interstitial ads on Android?

Interstitial ads should be displayed during natural pauses in the flow of an app. Between levels of a game is a good example, or after the user completes a task. To show an interstitial, use the show() method. Log.


Video Answer


1 Answers

I've this too. I've talked with people at AdMob and asked if they changed the behavior of their ads and they confirmed that they did. It's no longer possible to use the "Back" button to dismiss the interstitial ad and they told me that no changes are required on my side. I guess users must use the "Close" or "X" button within the ad itself to close it.

like image 187
Marcin Avatar answered Oct 23 '22 19:10

Marcin