question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Samsung - Lock screen appearing on app open

See original GitHub issue

Bug 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:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
shaibrown5commented, Feb 28, 2022

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

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
        <!-- Customize your theme here. -->
        <item name="colorPrimary">@color/colorPrimary</item>
        <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
        <item name="colorAccent">@color/colorAccent</item>
    </style>

    <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
        <item name="android:background">@null</item>
    </style>


    <style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
        <item name="android:background">@layout/launch_screen</item>
    </style>
</resources>

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.

0reactions
ionitron-bot[bot]commented, Nov 10, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Lock screen notification pop-up broken - Samsung Community
Lock screen notification pop-up broken · 1. Clear Partition cache through boot menu · 2. Turn off all notifications/ restart turn them back...
Read more >
How To Fix This Lock Screen Bug??? - Samsung Members
How To Fix This Lock Screen Bug??? ... Wait for next software updates it will be fixed or you can give feedback on...
Read more >
Samsung phone screen turns on automatically
Samsung phone screen turns on automatically ... There are several reasons why your phone screen may turn on, even if you didn't press...
Read more >
A Screen Overlay error appears on Samsung phone or tablet
A Screen Overlay error appears on Samsung phone or tablet · Navigate to Apps. Navigate to Settings, and then tap Apps. · Navigate...
Read more >
Notifications on lock screen not going straight to app after ...
Hello everyone, I found the problem! You need to "double-tap" the app notification on the lock screen in order to automatically open the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found