[Interstitial Ad] [Flutter] [Android] Android Back Button Dismiss Ad

117 views
Skip to first unread message

Yassin Saddem

unread,
Mar 18, 2025, 5:13:56 PM3/18/25
to Google Mobile Ads SDK Developers

## Description
When showing an interstitial ad using the `google_mobile_ads` plugin (version: 5.3.1, 5.2.0), pressing the Android back button dismisses the ad. I believe this is illogical behavior, as it allows users to bypass the ad without engaging with it or closing it properly via the ad’s UI. According to [Issue #398](https://github.com/googleads/googleads-mobile-flutter/issues/398), the intended behavior is that the back button *doesn’t* close the ad, but in my case, it does. This undermines the ad’s purpose and could affect monetization.

## Steps to Reproduce
1. Load an interstitial ad using `InterstitialAd.load()` with a valid ad unit ID.
2. Show the ad using `ad.show()`.
3. Press the Android back button while the ad is displayed.

## Expected Results
The back button should be disabled or ignored while the interstitial ad is visible, requiring the user to interact with the ad (e.g., close it via the "X" button) to proceed.

## Actual Results
The ad dismisses immediately when the back button is pressed, returning to the app.

## Environment
- **Plugin version:** 5.3.1 (latest as of March 5, 2025)
- **Flutter version:** 3.24.3 (run `flutter --version` to confirm)
- **Device:** Samsung Galaxy A52S, Android 14
- **Sample code:**
```dart
InterstitialAd.load(
  adUnitId: 'ca-app-pub-3940256099942544/1033173712', // Test ID
  request: const AdRequest(),
  adLoadCallback: InterstitialAdLoadCallback(
    onAdLoaded: (ad) {
      ad.fullScreenContentCallback = FullScreenContentCallback(
        onAdDismissedFullScreenContent: (ad) => ad.dispose(),
      );
      ad.show();
    },
    onAdFailedToLoad: (error) => print('Ad failed to load: $error'),
  ),
);

Mobile Ads SDK Forum Advisor

unread,
Mar 19, 2025, 12:39:11 AM3/19/25
to saddem...@gmail.com, google-adm...@googlegroups.com

Hi,

Thank you for contacting the Mobile Ads SDK Support team.

I will raise this issue with our team and one of my team members will reach out to you once we have an update on this. Meanwhile, your patience is highly appreciated.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5
[2025-03-19 04:37:55Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vHB4D:ref" (ADR-00295328)



Sunil

unread,
Mar 19, 2025, 4:26:56 AM3/19/25
to Google Mobile Ads SDK Developers
hello all user any types help connected we group whatsapps https://chat.whatsapp.com/CLGCH5Gowh0KncQrtWGF9D

Hamza Ahmad

unread,
Aug 11, 2025, 6:35:33 AM8/11/25
to Google Mobile Ads SDK Developers
Do we have any update on this? 

Please let us know. 

Mobile Ads SDK Forum Advisor

unread,
Aug 11, 2025, 11:58:50 AM8/11/25
to ha...@kmavericks.com, google-adm...@googlegroups.com

Hi,

Thank you for getting back to us.

Currently our team is investigating this issue. In the meantime, you may consider setting android:enableOnBackInvokedCallback="false" or removing android:enableOnBackInvokedCallback  attribute entirely from the Manifest file. This will prevent back press/gesture functionality until the user selects the advertisement's close button.


Thanks,
 
Google Logo Mobile Ads SDK Team

Feedback
How was our support today?

rating1    rating2    rating3    rating4    rating5

[2025-08-11 15:57:40Z GMT] This message is in relation to case "ref:!00D1U01174p.!5004Q02vHB4D:ref" (ADR-00295328)



Reply all
Reply to author
Forward
0 new messages