react-native-orientation-locker icon indicating copy to clipboard operation
react-native-orientation-locker copied to clipboard

[Android, 1.2.0] unlockAllOrientations makes possible to change the orientation despite the rotation lock on the phone

Open torcoste opened this issue 4 years ago • 12 comments

I just updated lib from 1.1.3 to 1.2.0 and now unlockAllOrientations makes possible to change the orientation by rotate device despite the rotation lock on the phone.

Platform: Android Version: 1.2.0

I had to roll back

torcoste avatar Sep 29 '20 13:09 torcoste

Same on iOS simulator

loiclouvet avatar Nov 16 '20 16:11 loiclouvet

Same issue on 1.1.1 and 1.1.3, @torcoste does it really work for you in 1.1.3?

Pingou avatar Nov 18 '20 08:11 Pingou

Same problem here. Maybe it's the intended behavior? In that case, it would be nice to have an extra function to disable all locks without overriding the OS lock.

MarioUnlam avatar Jan 25 '21 19:01 MarioUnlam

I have the same issue its overriding my phones rotation lock...

JowelTisso avatar Feb 06 '21 04:02 JowelTisso

Same issue on 1.1.1 and 1.1.3, @torcoste does it really work for you in 1.1.3?

@Pingou yes, it does work for me in 1.1.3

torcoste avatar Feb 07 '21 15:02 torcoste

Same problem on Android only. Version 1.1.3 & 1.1.8 respects the users rotation lock setting after calling unlockAllOrientations() Version 1.2.0 & 1.3.1 ignores the users rotation lock setting after calling unlockAllOrientations()

unstableair avatar Jul 06 '21 12:07 unstableair

@torcoste & @unstableair Thanks... It does work on 1.1.8... Was looking everywhere... Kudos

JowelTisso avatar Jul 12 '21 15:07 JowelTisso

Same issue goes for me, even on 1.1.8... (is it possible?)

JB-CHAUVIN avatar Aug 24 '21 16:08 JB-CHAUVIN

It appears to have been changed here... https://github.com/wonday/react-native-orientation-locker/commit/7a7db411d7da08efc08590883716b1dd2286fb37

Seems like changing that to FULL_USER instead of SENSOR should resolve the issue. Still need to confirm though.

mysport12 avatar Mar 02 '22 21:03 mysport12

It appears to have been changed here... 7a7db41

Seems like changing that to FULL_USER instead of SENSOR should resolve the issue. Still need to confirm though.

I replaced SCREEN_ORIENTATION_SENSOR by SCREEN_ORIENTATION_UNSPECIFIED in ./node_modules/react-native-orientation-locker/android/src/main/java/org/wonday/orientation/OrientationModule.java at the line modified by this commit, with version 1.5.0, and it indeed fixes the issue.

And despite the commit's name, it does not seem to break unlockAllOrientations.

Jim-Bar avatar Nov 04 '22 10:11 Jim-Bar

Same problem here, luckily @Jim-Bar and react-native-patch-package helped me out 🙏

jan-happy avatar Mar 20 '23 14:03 jan-happy