Skip to content

Conversation

@bparrishMines
Copy link
Contributor

@bparrishMines bparrishMines commented Aug 27, 2025

Supporting preloading ads on Android requires handling more than one AdMediaInfo at a time. See https://developers.google.com/interactive-media-ads/docs/sdks/android/client-side/preload.

This adds a queue to AndroidAdDisplayContainer to track which ad is currently playing. Also updates the example app with a screen to test various ad tag urls.

Fixes flutter/flutter#174243

Pre-Review Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

Footnotes

  1. Regular contributors who have demonstrated familiarity with the repository guidelines only need to comment if the PR is not auto-exempted by repo tooling. 2 3

@bparrishMines bparrishMines changed the title Ima preload fix [interactive_media_ads] Fixes preloading back-to-back ads on Android Aug 27, 2025
@bparrishMines bparrishMines changed the title [interactive_media_ads] Fixes preloading back-to-back ads on Android [interactive_media_ads] Fixes preloading ad while another was playing on Android Aug 27, 2025
@bparrishMines bparrishMines marked this pull request as ready for review August 27, 2025 20:56
Copy link
Collaborator

@stuartmorgan-g stuartmorgan-g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bparrishMines bparrishMines added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 3, 2025
@auto-submit auto-submit bot merged commit 9c6a5fe into flutter:main Sep 3, 2025
80 checks passed
@bparrishMines bparrishMines deleted the ima_preload_fix branch September 3, 2025 02:12
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Sep 3, 2025
github-merge-queue bot pushed a commit to flutter/flutter that referenced this pull request Sep 3, 2025
flutter/packages@5d785a0...42bb347

2025-09-03 [email protected] [google_maps_flutter] Fixes
exception when dispose is called while asynchronous update from
didUpdateWidget is executed (flutter/packages#9227)
2025-09-03 [email protected] [google_maps_flutter] Add
cameraControl enable/disable & position on web (flutter/packages#9089)
2025-09-03 [email protected] [tool] Only license-check checked-in
files (flutter/packages#9905)
2025-09-03 [email protected]
[interactive_media_ads] Fixes preloading ad while another was playing on
Android (flutter/packages#9904)
2025-09-02 [email protected] Update
FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922)
2025-09-02 [email protected] Update
Stubs for FlutterPluginRegistrar interface change
(flutter/packages#9923)
2025-09-02 [email protected]
[camera_android_camerax] Update Android minimum SDK version
(flutter/packages#9945)
2025-09-02 [email protected] Roll Flutter from
da5523a to 6b18740 (49 revisions) (flutter/packages#9926)
2025-09-02 [email protected] [various] Scrub pre-iOS-13 code
(flutter/packages#9849)
2025-09-02 [email protected] [google_maps_flutter_web] Add
cameraControl enable/disable & position on web (flutter/packages#9921)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
mboetger pushed a commit to mboetger/flutter that referenced this pull request Sep 18, 2025
flutter/packages@5d785a0...42bb347

2025-09-03 [email protected] [google_maps_flutter] Fixes
exception when dispose is called while asynchronous update from
didUpdateWidget is executed (flutter/packages#9227)
2025-09-03 [email protected] [google_maps_flutter] Add
cameraControl enable/disable & position on web (flutter/packages#9089)
2025-09-03 [email protected] [tool] Only license-check checked-in
files (flutter/packages#9905)
2025-09-03 [email protected]
[interactive_media_ads] Fixes preloading ad while another was playing on
Android (flutter/packages#9904)
2025-09-02 [email protected] Update
FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922)
2025-09-02 [email protected] Update
Stubs for FlutterPluginRegistrar interface change
(flutter/packages#9923)
2025-09-02 [email protected]
[camera_android_camerax] Update Android minimum SDK version
(flutter/packages#9945)
2025-09-02 [email protected] Roll Flutter from
da5523a to 6b18740 (49 revisions) (flutter/packages#9926)
2025-09-02 [email protected] [various] Scrub pre-iOS-13 code
(flutter/packages#9849)
2025-09-02 [email protected] [google_maps_flutter_web] Add
cameraControl enable/disable & position on web (flutter/packages#9921)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Jaineel-Mamtora pushed a commit to Jaineel-Mamtora/flutter_forked that referenced this pull request Sep 24, 2025
flutter/packages@5d785a0...42bb347

2025-09-03 [email protected] [google_maps_flutter] Fixes
exception when dispose is called while asynchronous update from
didUpdateWidget is executed (flutter/packages#9227)
2025-09-03 [email protected] [google_maps_flutter] Add
cameraControl enable/disable & position on web (flutter/packages#9089)
2025-09-03 [email protected] [tool] Only license-check checked-in
files (flutter/packages#9905)
2025-09-03 [email protected]
[interactive_media_ads] Fixes preloading ad while another was playing on
Android (flutter/packages#9904)
2025-09-02 [email protected] Update
FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922)
2025-09-02 [email protected] Update
Stubs for FlutterPluginRegistrar interface change
(flutter/packages#9923)
2025-09-02 [email protected]
[camera_android_camerax] Update Android minimum SDK version
(flutter/packages#9945)
2025-09-02 [email protected] Roll Flutter from
da5523a to 6b18740 (49 revisions) (flutter/packages#9926)
2025-09-02 [email protected] [various] Scrub pre-iOS-13 code
(flutter/packages#9849)
2025-09-02 [email protected] [google_maps_flutter_web] Add
cameraControl enable/disable & position on web (flutter/packages#9921)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
lucaantonelli pushed a commit to lucaantonelli/flutter that referenced this pull request Nov 21, 2025
flutter/packages@5d785a0...42bb347

2025-09-03 [email protected] [google_maps_flutter] Fixes
exception when dispose is called while asynchronous update from
didUpdateWidget is executed (flutter/packages#9227)
2025-09-03 [email protected] [google_maps_flutter] Add
cameraControl enable/disable & position on web (flutter/packages#9089)
2025-09-03 [email protected] [tool] Only license-check checked-in
files (flutter/packages#9905)
2025-09-03 [email protected]
[interactive_media_ads] Fixes preloading ad while another was playing on
Android (flutter/packages#9904)
2025-09-02 [email protected] Update
FWFWebViewFlutterWKWebViewExternalAPITests.swift (flutter/packages#9922)
2025-09-02 [email protected] Update
Stubs for FlutterPluginRegistrar interface change
(flutter/packages#9923)
2025-09-02 [email protected]
[camera_android_camerax] Update Android minimum SDK version
(flutter/packages#9945)
2025-09-02 [email protected] Roll Flutter from
da5523a to 6b18740 (49 revisions) (flutter/packages#9926)
2025-09-02 [email protected] [various] Scrub pre-iOS-13 code
(flutter/packages#9849)
2025-09-02 [email protected] [google_maps_flutter_web] Add
cameraControl enable/disable & position on web (flutter/packages#9921)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages-flutter-autoroll
Please CC [email protected] on the revert to ensure that a
human
is aware of the problem.

To file a bug in Flutter:
https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

autosubmit Merge PR when tree becomes green via auto submit App p: interactive_media_ads Plugin for IMA SDK platform-android platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[interactive_media_ads]: Back-to-back ads not working on Android

2 participants