Implementing Auto-Rotation camera in React Native Expo Project

102 Views Asked by At

I am developing a project using React Native Expo and am currently working on implementing a camera feature. I want the camera to automatically switch between landscape and portrait modes based on the device's orientation.

To achieve this, I tried using Dimensions from react-native and expo-screen-orientation. However, I found that this functionality does not work on actual devices when the auto-rotation feature is turned off.

I've noticed that standard camera apps can automatically rotate the screen according to the device's orientation, even when the auto-rotation is disabled. How can I implement a similar feature in my React Native Expo project?

I am seeking advice on any methods or libraries that should be used, or specific approaches to implementing this functionality. Thank you for your help.

0

There are 0 best solutions below