Search code examples
androidreact-nativeangle

Getting Device Pitch of Android Device in React Native


Is there any library that gives pitch(One of the device tilt angle) information in React-Native?

Found Library but is only for IOS.

Do we have any similar ones for Android?


Solution

  • The React Native Sensors library is useful to only get info of Accelerometer and Gyroscope.

    However, it doesn't provide any information about calculating the pitch, roll and yaw of the device like how Native Android Development does.

    There exists another react-native library React Native Sensor Manager, which provides orientation data and also access to other sensors data such as Step Detector and Proximity Sensor