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.

Android does not lock

See original GitHub issue

Library Version: 1.3.1 RN Version: 0.64.0 Android Version: 11

We don’t seem to have updated this library or the code around it recently though I did try upgrading to the latest as you can see and the issue persisted.

Description On Android, calling one of the lockTo... functions doesn’t seem to work at all suddenly. I have followed the setup carefully as seen below. The hook is called to set the lock once, makes it through the tablet condition, and does not throw an error, but the screen on Android will rotate no matter what.

AndroidManifest.xml Screen Shot 2021-05-19 at 6 47 23 PM MainActivity.java Screen Shot 2021-05-19 at 6 47 39 PM MainApplication.java Screen Shot 2021-05-19 at 6 47 59 PM App.tsx Screen Shot 2021-05-19 at 6 49 27 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

3reactions
alburdette619commented, May 20, 2021

Anyone looking in the future, it was a bug on react-native-screens setting it to unspecified. The new version should be out soon after this post I hope. At the moment I am having to use master or patch

1reaction
matinzdcommented, Feb 27, 2022

Anyone looking in the future, it was a bug on react-native-screens setting it to unspecified. The new version should be out soon after this post I hope. At the moment I am having to use master or patch

Oh god! I have been dealing with this whole time. I thought that there was a bug in my code and I am unlocking orientation somwhere. I also tried locking orientation inthe main activity, checking your repository for possible bug, but it didn’t work. Just upgraded react-native-screens from 3.0.0 to 3.12.0 and it’s fixed now. Damn …

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTC U11 - Why won't my phone lock even when I've already ...
If you've set up your screen lock PIN, password, or fingerprint scanner—if your phone has one—and the phone still won't lock, you may...
Read more >
Smart Lock on Android Not Working? Try These 5 Solutions
Smart Lock on Android Not Working? Try These 5 Solutions · 1. Don't Enter It, Drop It · 2. Set Location Accuracy Mode...
Read more >
Set screen lock on an Android device - Google Support
Set or change a screen lock · Open your phone's Settings app. · Tap Security. If you don't find “Security,” go to your...
Read more >
Phone won't lock - Android Forums at AndroidCentral.com
When I push the power button to shut off screen the next time I go to wake up the phone it doesn't come...
Read more >
Unable to Unlock Your Android Smartphone? Here's What ...
For most phones, you can boot into safe mode by bringing up the power menu from the lock screen, then long-pressing the “Power...
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