react-native-orientation-locker
react-native-orientation-locker copied to clipboard
Android app crash when orientation change to landscape
When I call the Orientation.lockToLandscape() I have the following error:

If I start the app in landscape and switch to portrait, the error doesn't happen
My activity tag in AndroidManifest.xml :
<activity android:name=".MainActivity" android:label="@string/app_name" android:configChanges="keyboard|keyboardHidden|orientation|screenSize" android:launchMode="singleTask" android:exported="true">
Overriding the method in MainActivity.Java :
@Override public void onConfigurationChanged(Configuration newConfig) { super.onConfigurationChanged(newConfig); Intent intent = new Intent("onConfigurationChanged"); intent.putExtra("newConfig", newConfig); this.sendBroadcast(intent); }
react-native: 0.61.5 react-navigation: 2.12.1
Any solution?
I am facing this issue too. Any progress from your side ?
found a similar problem happens in Android SDK 30 (Android 11) but not Android 10