googleads / googleads-mobile-flutter

A Flutter plugin for the Google Mobile Ads SDK
Apache License 2.0
341 stars 285 forks source link

When my app was in foreground, I still received a log about Interstitials Ad showing violation in background #847

Closed duocnguyen6799 closed 1 year ago

duocnguyen6799 commented 1 year ago

Plugin Version

google_mobile_ads: ^2.4.0

Steps to Reproduce

I used Interstitial ad test id. ca-app-pub-3940256099942544/1033173712

When my app was in the foreground, these logs showed: Interstitials that show when your app is in the background are a violation of AdMob policies and may lead to blocked ad serving. To learn more, visit https://googlemobileadssdk.page.link/admob-interstitial-policies

So, does anyone encounters like me? Is this an issue? Please help me!

huycozy commented 1 year ago

Hi @duocnguyen6799 Please provide a minimal and complete sample code so that we may verify the issue properly. Meanwhile, you can check this on plugin example to see if the issue is reproducible or not. Thanks!

github-actions[bot] commented 1 year ago

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. If you find this problem please file a new issue with the same description, what happens, logs and the output of 'flutter doctor -v'. All system setups can be slightly different so it's always better to open new issues and reference the related ones. Thanks for your contribution.

peterweb2005 commented 1 year ago

same here, somehow before flutter pause(), but android native show error

plugin version 3.0.0 flutter version 3.10.6

and i tried manually looping "pause resume" many times to make "app open ad" show, in order to try if any errors

I/flutter (22637): 2023-08-17 05:46:47.620863 FINER [AdService] **
I/flutter (22637): 2023-08-17 05:46:47.621187 FINER [AdService] appStateStream onData()
I/flutter (22637): 2023-08-17 05:46:47.621363 FINEST [AdService] event: AppState.foreground
I/flutter (22637): 2023-08-17 05:46:47.621588 FINER [AdService] **
I/flutter (22637): 2023-08-17 05:46:47.621747 FINEST [AdService] foreground: true
I/flutter (22637): 2023-08-17 05:46:47.621916 FINER [AdService] resume()
I/flutter (22637): 2023-08-17 05:46:47.622033 FINEST [AdService] consentContext.completed: true
I/flutter (22637): 2023-08-17 05:46:47.622131 FINEST [AdService] adAppState: AdAppState.admob
I/flutter (22637): 2023-08-17 05:46:47.622237 FINER [AppOpenAdHandler] resume()
I/flutter (22637): 2023-08-17 05:46:47.622328 FINER [AdWorkflow-AppOpenAdHandler] resume()
I/flutter (22637): 2023-08-17 05:46:47.622420 FINER [AdWorkflow-AppOpenAdHandler] toShowing()
I/flutter (22637): 2023-08-17 05:46:47.622575 FINER [AppOpenAdHandler] tryShowAd()
I/flutter (22637): 2023-08-17 05:46:47.622665 FINER [AppOpenAdAdapter] show()
I/flutter (22637): 2023-08-17 05:46:47.622768 FINER [AppOpenAdAdapter] validateShow()
I/flutter (22637): 2023-08-17 05:46:47.622860 FINER [AppOpenAdAdapter] _fullScreenShowing: false
I/flutter (22637): 2023-08-17 05:46:47.623003 FINER [AppOpenAdAdapter] **after validate show
W/Parcel  (22637): Expecting binder but got null!
I/flutter (22637): 2023-08-17 05:46:47.725251 FINE [App] **
I/flutter (22637): 2023-08-17 05:46:47.727447 FINE [App] **MaterialApp TransitionBuilder builder
I/flutter (22637): 2023-08-17 05:46:47.730006 FINE [App] **
E/FrameEvents(22637): updateAcquireFence: Did not find frame.
W/Ads     (22637): Interstitials that show when your app is in the background are a violation of AdMob policies and may lead to blocked ad serving. To learn more, visit  https://googlemobil
eadssdk.page.link/admob-interstitial-policies
D/TrafficStats(22637): tagSocket(302) with statsTag=0xffffffff, statsUid=-1
E/FrameEvents(22637): updateAcquireFence: Did not find frame.
D/TrafficStats(22637): tagSocket(340) with statsTag=0xffffffff, statsUid=-1
I/flutter (22637): 2023-08-17 05:46:48.075568 FINER [App] **onStateChanged()
I/flutter (22637): 2023-08-17 05:46:48.076344 FINEST [App] previous: AppLifecycleState.paused
I/flutter (22637): 2023-08-17 05:46:48.076647 FINEST [App] current: AppLifecycleState.paused
I/flutter (22637): 2023-08-17 05:46:48.077488 FINE [AppServiceBase] **
I/flutter (22637): 2023-08-17 05:46:48.078058 FINE [AppServiceBase] didChangeAppLifecycleState()
I/flutter (22637): 2023-08-17 05:46:48.078630 FINE [AppServiceBase] **
I/flutter (22637): 2023-08-17 05:46:48.079152 FINEST [AppServiceBase] state: AppLifecycleState.paused
I/flutter (22637): 2023-08-17 05:46:48.079527 FINE [AppService] pause()
I/flutter (22637): 2023-08-17 05:46:48.086017 WARNING [AppOpenAdAdapter] on ad failed to show, e: AdError(code: 3, domain: com.google.android.gms.ads, message: The ad can not be shown when
app is not in foreground.)
I/flutter (22637): 2023-08-17 05:46:48.088894 WARNING [AdWorkflow-AppOpenAdHandler] failed to show: AdError(code: 3, domain: com.google.android.gms.ads, message: The ad can not be shown whe
n app is not in foreground.)