yamill / react-native-orientation

Listen to device orientation changes in react-native and set preferred orientation on screen to screen basis.
https://www.npmjs.com/package/react-native-orientation
ISC License
1.72k stars 810 forks source link

get orientation change while locking to portrait #370

Open ChintanRajpara opened 4 years ago

ChintanRajpara commented 4 years ago

I am building a camera application and there i want to shoot both landscape and portrait videos, the problem I am facing is that I don’t want my whole screen to be rotated while the device gets rotated, instead I want my camera screen to be locked on portrait mode and rotate the icons by using “Animated”, but while locking to portrait I am not able to get the “onOrientationChange” eventListener fired. so is there any way to get onOrientationChange listeners while locking to portrait?

sfreeman28 commented 4 years ago

What platform are you testing on?

I found that when locked to portrait, on iOS my onOrientationChange listener still gets fired, but on Android it doesn't.

ChintanRajpara commented 4 years ago

I was testing upon android

Yozine commented 4 years ago

Is it possible to receive these events from Android while it's locked in portrait?

ChintanRajpara commented 4 years ago

no @Yozine