googleads-mobile-flutter
googleads-mobile-flutter copied to clipboard
[Android]AppOpen ads and interstitial ads affect the status bar style in version 5.0.0.
Step 0: Are you in the right place?
-
For general technical questions, or help with project-specific issues like setting up ads in your app, reach out to our support team on the Developer Forum.
-
For assistance with your AdMob account, reach out to AdMob Support.
-
For feedback on our documentation, send your feedback by pressing the Send Feedback button at the top right of the documentation page you are on.
-
For issues related to the code in this repository, continue filing this GitHub issue.
-
Once you've read this section and determined that your issue is appropriate for this repository, please delete this section.
[REQUIRED] Step 1: Describe your environment
Plugin Version
v5.0.0
[REQUIRED] Step 2: Describe the problem
When I use the v5.0.0 version of the plug-in, after displaying AppOpen ads or Interstitial ads, the status bar turns black when I return to the app. Version v4.0.0 does not have this problem.
Steps to Reproduce
- Open the app and display the AppOpen ad.
- Turn off screen-opening ads.
- Then switch the application to the background.
- Open the application again.
Expected results: The status bar maintains its original style.
Actual results: The status bar background color changes to black.
Logs
Record screen: o061s-zyoyu.webm
Hey @ruiyong-lee, we are currently working on a fix for AppOpen and Interstitial ads https://github.com/googleads/googleads-mobile-flutter/issues/1013 that may inherently fix this as well. Will check to see if that's the case
@malandr2 Thank you for your reply. I saw that this issue appeared in version v4.0.0, and it was a bug that prevented advertisements from going full screen. But my problem is that it works fine in version v4.0.0. When using version v5.0.0, after the ads are turned off, the immersive status bar is affected by the ads and a black status bar appears.
Thanks @ruiyong-lee, I've shared this with engineering to take a closer look.
Hello @ruiyong-lee, could you share more information regarding this issue? It would help figure it out. I want to know if it happens on any device and/or API levels.
@LTPhantom flutter: 3.16.9 or 3.19.4 Divice: 1.Galaxy A53 5G UW (API33) 2.Simulator Pixel 7 Pro API30 3.Simulator Pixel 7 Pro API34
Video: https://github.com/googleads/googleads-mobile-flutter/assets/12726826/9eb7abbb-eb27-4aae-842c-d7c57eb32c4e
facing same issue
same issue , when interstital ads showed , the app status bar became black !!!
same issue.
i have same issue
Having the same issue here.
The engineering team is looking into this and working on a fix. Thanks all.
Hello I have been trying to replicate the issue without luck, @ruiyong-lee could it be possible to share a code sample with the issue?
same issue.
@all
For those replying same issue, can you provide a minimum reproducible sample? This will help engineering debug (https://github.com/googleads/googleads-mobile-flutter/issues/1039#issuecomment-2075919511)
Thanks!
Oh my god, I found this incredible reason. This problem will occur as long as this library is introduced.
implementation 'com.blankj:utilcodex:1.31.1'
I removed this plug-in, but this bug still occurs during hot reloading occasionally, so you can use this plug-in to see if there is any problem. After all, this will not happen in version 4.0.0.
@ALL
If you are using implementation 'com.blankj:utilcodex:1.31.1'
can you confirm the issue can no longer be reproduced when removed?
If you not using implementation 'com.blankj:utilcodex:1.31.1'
and the issue can still be reproduced, can your provide a minimum reproducible sample?
@devchenli that's good to know. It's possible eng was unable to reproduce could be due them being on 3.19.6.
Recommend to @ALL is to update Flutter version to >= 3.19.6 and see if this issue can still be replicated
I have updated Flutter to 3.19.6 and the problem is still there.
Once I reopen the app from the background and the App-open-ad appears, the status bar turns black and the page shifts up. While in an emulator it turns back to normal with the closure of the app open. in real devices, it stays there. The code that was used is exactly like https://developers.google.com/admob/flutter/app-open with the exception of removing the line "orientation: AppOpenAd.orientationPortrait," Hope my comment helps
@iskamal what device and OS are you on?
@malandr2 For real device is S20+ Android 13, also saw it on an older device with an older Android version.
for Emulators, pretty much all from Android 11 up to 14. but it returns to normal right after the closure of the app-open Ad
below are the screenshots of what happens to the status bar and SliverAppBar() before and after the app-open ad appears on a real device
The same problem occurs here using version 5.0.0.
After displaying the App Open Ad it is not possible to change the color of the Status Bar, the following code does not work after displaying the App Open Ad:
SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle.light.copyWith(
statusBarColor: Colors.red,
statusBarBrightness: Brightness.light,
statusBarIconBrightness: Brightness.dark
));
Device: Samsung Galaxy A72 - SM-A725M/DS
Thanks everyone for sharing more info. I want to nail down exactly what could everyone have in common to find the root cause of this issue.
These are my thoughts so far:
- This might not be a device related issue nor an android version related problem since it seems to happen on real devices and emulators on all kind of API numbers.
- Given the screenshots and videos shared, this seems to be related to the way the Flutter apps are built, so I would like to get more information related to the app constitution:
- Am I right to believe that you don't use the
AppBar
widget? - Similar to this comment, are there any theme configuration done? Either direct Android theme xml configuration, or dart theme values that are related to the status bar that could be related to the issue?
- Is minimizing and returning to the app a necessary step to reproduce this issue or does it happen right after closing the app open ad? Does the same happen if the phone screen is turned off and then back on?
- Am I right to believe that you don't use the
- If anyone could share a minimum code app with this issue, that would be extremely helpful since even with the sample mentioned here, I am not able to get the same behavior.
@LTPhantom I found the steps that will surely lead to the bug and provided a demo. This seems to be related to video-type native ads. Once a video-type native ad is displayed, the status bar turns black. Image-type native ads do not have this problem. But the new 5.1.0 version seems to have fixed this bug. demo:https://github.com/ruiyong-lee/test_google_ad
But the new 5.1.0 version seems to have fixed this bug.
Can others confirm if the original issue cannot be replicated with 5.1.0?
Yes, after updating to 5.1.0 the bug no longer appears
Yes, after updating to 5.1.0 the bug no longer appears
Yeah same here. Black status bar bug is not seems like fixed after 5.1.0.
@all
Can others confirm? If no one can reproduce the issue on version 5.1.0 I'll close this issue out. Will keep it open for a few days.
5.1.0
showing white bar its shold show full screen not background white bar