bug: Samsung - Lock screen appearing on app open
See original GitHub issueBug Report
Capacitor Version
💊 Capacitor Doctor 💊
Latest Dependencies:
@capacitor/cli: 3.4.1
@capacitor/core: 3.4.1
@capacitor/android: 3.4.1
@capacitor/ios: 3.4.1
Installed Dependencies:
@capacitor/cli: 3.3.2
@capacitor/android: 3.3.3
@capacitor/core: 3.3.2
@capacitor/ios: 3.3.3
[success] Android looking great! 👌
Platform(s)
Android, precisely some Samsung devices (tested on Samsung Galaxy S10+, Samsung A52 and SamsungA53; also tested on Samsung A51S but seemed to work there)
Current Behavior
When the app is opened, the lock screen appears after most of the screen turns black, getting the phone locked and requiring to unlock it again. It happens multiple time before the app comes into view, repeating the process in the moment you unlock the phone fairly quickly. I cannot find the issue that may be causing this, and what I have found in the logs I have no idea what it means or how I can solve it.
Expected Behavior
As simple as opening the app, the lock screen should not appear but rather the splash screen and the app contents later. My only guess is that maybe the splash screen is not working properly.
Code Reproduction
The code of the application where the bug appears con be found in @biocienciasgrx/ceebi. As I have not the slightest idea where the error may be, I cannot be more precise than this.
Other Technical Details
npm --version
output: 7.20.2
node --version
output: v16.4.1
Additional Context
You can find the debug logs from Android Studio of a Samsung Galaxy S10+ that shows this issue in the following gist (too long to paste it here): https://gist.github.com/HipyCas/8e86980ca673b0c86440938d7de883c0
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:11 (3 by maintainers)
Top GitHub Comments
@jcesarmobile While creating the sample app I managed to replicate the bug and solve the issue
My styles.xml file under src/main/res/values/styles.xml looks l like this:
this line was the problem:
<item name="android:background">@layout/launch_screen</item>
launch_screen is XML and as soon as I changed it to either @null or to the default @drawable/splash the problem solved itself.@HipyCas try changing yours as well, see if it works for you. It’s weird that this works on other android versions and only now it crashes.
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Capacitor, please create a new issue and ensure the template is fully filled out.