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();
}
});
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With