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

[Android]AppOpen ads and interstitial ads affect the status bar style in version 5.0.0.

Open ruiyong-lee opened this issue 10 months ago • 24 comments

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

  1. Open the app and display the AppOpen ad.
  2. Turn off screen-opening ads.
  3. Then switch the application to the background.
  4. 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

ruiyong-lee avatar Mar 27 '24 12:03 ruiyong-lee

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 avatar Mar 27 '24 17:03 malandr2

@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.

ruiyong-lee avatar Mar 28 '24 05:03 ruiyong-lee

Thanks @ruiyong-lee, I've shared this with engineering to take a closer look.

malandr2 avatar Mar 29 '24 15:03 malandr2

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 avatar Mar 29 '24 22:03 LTPhantom

@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

ruiyong-lee avatar Apr 02 '24 09:04 ruiyong-lee

Video: https://github.com/googleads/googleads-mobile-flutter/assets/12726826/9eb7abbb-eb27-4aae-842c-d7c57eb32c4e

ruiyong-lee avatar Apr 02 '24 09:04 ruiyong-lee

facing same issue

alihassan143 avatar Apr 04 '24 05:04 alihassan143

same issue , when interstital ads showed , the app status bar became black !!!

devchenli avatar Apr 07 '24 04:04 devchenli

same issue.

lhdio avatar Apr 09 '24 11:04 lhdio

i have same issue

droplet-js avatar Apr 12 '24 05:04 droplet-js

Having the same issue here.

FernandoUFS avatar Apr 16 '24 14:04 FernandoUFS

The engineering team is looking into this and working on a fix. Thanks all.

malandr2 avatar Apr 16 '24 21:04 malandr2

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?

LTPhantom avatar Apr 24 '24 22:04 LTPhantom

same issue.

lunasoft79 avatar Apr 27 '24 06:04 lunasoft79

@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!

malandr2 avatar Apr 27 '24 18:04 malandr2

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'

ruiyong-lee avatar Apr 28 '24 05:04 ruiyong-lee

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.

ruiyong-lee avatar Apr 29 '24 08:04 ruiyong-lee

@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?

malandr2 avatar Apr 29 '24 13:04 malandr2

@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

malandr2 avatar May 01 '24 17:05 malandr2

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 avatar May 01 '24 20:05 iskamal

@iskamal what device and OS are you on?

malandr2 avatar May 02 '24 14:05 malandr2

@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

Screenshot_20240502_180519 Screenshot_20240502_180530

iskamal avatar May 02 '24 15:05 iskamal

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

ClebsonDantasUchoa avatar May 03 '24 19:05 ClebsonDantasUchoa

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?
  • 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 avatar May 03 '24 21:05 LTPhantom

@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

ruiyong-lee avatar May 10 '24 08:05 ruiyong-lee

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?

malandr2 avatar May 10 '24 16:05 malandr2

Yes, after updating to 5.1.0 the bug no longer appears

iskamal avatar May 11 '24 21:05 iskamal

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.

GeceGibi avatar May 12 '24 11:05 GeceGibi

@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.

malandr2 avatar May 14 '24 01:05 malandr2

Screenshot_1715666531 5.1.0 showing white bar its shold show full screen not background white bar

alihassan143 avatar May 14 '24 06:05 alihassan143