googleads-mobile-flutter icon indicating copy to clipboard operation
googleads-mobile-flutter copied to clipboard

Native Video Ads isn't paused when the tab isn't active (switched to another tab) on Android

Open ultraon opened this issue 1 year ago • 4 comments

[REQUIRED] Step 1: Describe your environment

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.3, on macOS 13.6.2 22G320 darwin-arm64, locale en-UA) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] IntelliJ IDEA Community Edition (version 2023.3.4) [✓] VS Code (version 1.85.1) [✓] Connected device (5 available)

Plugin Version

v4.0.0

[REQUIRED] Step 2: Describe the problem

Steps to Reproduce

The problem is simple. And it is 100% reproducible on Android (iOS works well).

Steps to reproduce:

  • Add BottomNavigationBar with a few tabs
  • Integrate Native Template Ads on the 1st tab
  • use the test ad_unit_id: /6499/example/native-video and load the ads, video Ads should be played
  • unmute sound (if it is muted) on the Ads Video frame
  • switch to another tab

Expected: The video Ads playback should be paused, the sound shouldn't be playing. Actual: The video Ads playback continues playing, and the sound is playing.

On iOS it works properly.

ultraon avatar Apr 05 '24 20:04 ultraon

Hi @ultraon, can you provide a minimum reproducible sample for further debugging. Thanks!

malandr2 avatar Apr 08 '24 15:04 malandr2

Hi @ultraon, can you provide a minimum reproducible sample for further debugging. Thanks!

Hello @malandr2 , I've created a minimum reproducible sample. This is the repo: https://github.com/ultraon/sample_android_ads_issue In the repo description (README.md) I added details and how to reproduce. On iOS it works as expected. On Android it doesn't.

ultraon avatar Apr 10 '24 19:04 ultraon

Hey @ultraon, I'm able to reproduce this, thanks for creating the sample. I think this is a Flutter issue, even though it only happens on Android. I've escalated this to the Flutter team to confirm it's a google_mobile_ads plugin issue.

malandr2 avatar Apr 19 '24 22:04 malandr2

Thank you!

ultraon avatar Apr 19 '24 23:04 ultraon