-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Black or blank screen seen after keeping application idle and then open the application in cordova version >= 10. #1712
Comments
It's possible that the blank screen you're seeing is the splashscreen without the icon resource being rendered, which is a bug within the android platform. The splash screen will be black or dark if the device is using a night/dark theme. Having a small video clip of what you're seeing can probably tell us if this is the issue you're experiencing. |
Please check the video for reference. @breautek Edit: Removed the video. Sample app will made to reproduce to know exact RCA. |
Thanks. Yah that's a strange one, that black screen isn't the splashscreen. If it was, it would have been black immediately before seeing your application view, and then typically the splashscreen will get dismissed showing your application view. Here we see your application view, without seeing any splashscreen immediately, and then the screen goes black. So I don't think it's actally that splashscreen bug that I linked above. Is this issue reproducible in a sample test application? If you can provide one, it will help isolate the cause away from your own application and/or any plugins that your project might be running which will in turn help find the root cause. |
Relating to the Android platform bug in https://issuetracker.google.com/issues/205021357, I saw that someone listed a possible fix in comment 69 for the icon not displaying when launching the app from a notification, which I'm also experiencing using cordova-android 13.0.0, on an Android 14 device. The solution seems to be to add the following item to styles.xml (which I assumed to be themes.xml in Cordova):
I tried adding the "icon_preferred" item to android/app/src/main/res/values/themes.xml but it didn't seem to resolve it. I'm not sure whether cordova-android needs to integrate this before it takes effect. The Android documentation also seems to list this item as an option to always display the splash screen icon. (https://developer.android.com/develop/ui/views/launch/splash-screen#set-theme) Could this solution possibly be tested in cordova-android to confirm whether it resolves the issue? |
Looks interesting, though it seems to only apply on API 33+ devices (Android 13 and later), based on the docs:
It's weird that it doesn't appear to be working on Android 14. That should be the right place for this, but if you're editing the file manually and using the Cordova CLI to build, the CLI might be replacing and overwriting that themes file. If this is happening, then building and testing directly from Android Studio might allow you to test the parameter.
I don't have access to the original video but based on #1712 (comment) it seems like the OP issue didn't appear to be related to https://issuetracker.google.com/issues/205021357 and was likely an application issue rather than a framework issue. So I don't think it will solve this issue (which seems stale now, as no reproduction app was ever produced), but that doesn't mean we can't expose the behaviour option through a preference or something. |
Bug Report
Problem
Device is having lock screen password.Black or blank screen seen after keeping application idle and then open the application in cordova version >= 10.Issue is not seen in older cordova version.
What is expected to happen?
There should not be any Black or blank screen seen after idle.
What does actually happen?
There is Black or blank screen seen after idle.
Information
Device is having lock screen password. Keep cordoava application idle for sometime and open.
Environment, Platform, Device
Android Devices.
Version information
Cordova v >= 10.
Checklist
The text was updated successfully, but these errors were encountered: