Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ruiyong-lee opened this issue Mar 27, 2024 · 33 comments
Assignees
Labels
app open ad Issues related to App Open ads interstitial ad Issues related to Interstitial Ad

Comments

@ruiyong-lee
Copy link

ruiyong-lee commented Mar 27, 2024

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 ruiyong-lee changed the title AppOpen ads and interstitial ads affect the status bar style. [Android]AppOpen ads and interstitial ads affect the status bar style. Mar 27, 2024
@ruiyong-lee ruiyong-lee changed the title [Android]AppOpen ads and interstitial ads affect the status bar style. [Android]AppOpen ads and interstitial ads affect the status bar style in version 5.0.0. Mar 27, 2024
@malandr2
Copy link
Collaborator

Hey @ruiyong-lee, we are currently working on a fix for AppOpen and Interstitial ads #1013 that may inherently fix this as well. Will check to see if that's the case

@ruiyong-lee
Copy link
Author

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

@malandr2
Copy link
Collaborator

malandr2 commented Mar 29, 2024

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

@malandr2 malandr2 added in triage Issue currently being evaluated interstitial ad Issues related to Interstitial Ad app open ad Issues related to App Open ads labels Mar 29, 2024
@LTPhantom
Copy link
Collaborator

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.

@malandr2 malandr2 added the feedback required Further information is requested label Apr 1, 2024
@ruiyong-lee
Copy link
Author

@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

@github-actions github-actions bot removed the feedback required Further information is requested label Apr 2, 2024
@ruiyong-lee
Copy link
Author

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

@alihassan143
Copy link

facing same issue

@devchenli
Copy link

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

@lhdio
Copy link

lhdio commented Apr 9, 2024

same issue.

@droplet-js
Copy link

i have same issue

@FernandoUFS
Copy link

Having the same issue here.

@malandr2
Copy link
Collaborator

malandr2 commented Apr 16, 2024

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

@LTPhantom
Copy link
Collaborator

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 LTPhantom added the feedback required Further information is requested label Apr 24, 2024
@github-actions github-actions bot removed the feedback required Further information is requested label Apr 26, 2024
@lunasoft79
Copy link

same issue.

@malandr2 malandr2 added the feedback required Further information is requested label Apr 27, 2024
@malandr2
Copy link
Collaborator

@ALL

For those replying same issue, can you provide a minimum reproducible sample? This will help engineering debug (#1039 (comment))

Thanks!

@ruiyong-lee
Copy link
Author

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'

@github-actions github-actions bot removed the feedback required Further information is requested label Apr 28, 2024
@ruiyong-lee
Copy link
Author

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.

@malandr2
Copy link
Collaborator

@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
Copy link
Collaborator

malandr2 commented May 1, 2024

@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

@iskamal
Copy link

iskamal commented May 1, 2024

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

@malandr2
Copy link
Collaborator

malandr2 commented May 2, 2024

@iskamal what device and OS are you on?

@iskamal
Copy link

iskamal commented May 2, 2024

@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

@ClebsonDantasUchoa
Copy link

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

@LTPhantom
Copy link
Collaborator

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 LTPhantom added the feedback required Further information is requested label May 3, 2024
@ruiyong-lee
Copy link
Author

@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

@github-actions github-actions bot removed the feedback required Further information is requested label May 10, 2024
@malandr2
Copy link
Collaborator

malandr2 commented May 10, 2024

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 malandr2 added the feedback required Further information is requested label May 10, 2024
@iskamal
Copy link

iskamal commented May 11, 2024

Yes, after updating to 5.1.0 the bug no longer appears

@GeceGibi
Copy link

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.

@malandr2
Copy link
Collaborator

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

@alihassan143
Copy link

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

@malandr2
Copy link
Collaborator

malandr2 commented May 14, 2024

Hi @alihassan143 that is working as intended.

I tested this behavior using our Android Interstitial example and the ad does not cover the notch. See above the the issue is related to the status bar color after an ad appears and is dismissed.

Screenshot_1715697287

@malandr2
Copy link
Collaborator

Closing this out due to inactivity. Others who come across this issue please update your flutter google_mobile_ads plugin version >= 5.1.0.

If it is still occurring after updating please create a new issue.

@malandr2 malandr2 removed feedback required Further information is requested in triage Issue currently being evaluated p1-high labels May 28, 2024
@rahsuttushar
Copy link

This issue is still present google_mobile_ads: ^5.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
app open ad Issues related to App Open ads interstitial ad Issues related to Interstitial Ad
Projects
None yet
Development

No branches or pull requests