Expo

Documentation

Sensors

Various APIs for accessing device sensors are included under this umbrella package called expo-sensors.
Platform Compatibility
Android DeviceAndroid EmulatoriOS DeviceiOS SimulatorWeb

For managed apps, you'll need to run expo install expo-sensors. To use it in a bare React Native app, follow its installation instructions.

import * as Sensors from 'expo-sensors';
// OR
import {
  Accelerometer,
  Barometer,
  Gyroscope,
  Magnetometer,
  MagnetometerUncalibrated,
  Pedometer,
} from 'expo-sensors';
For more information, please see the documentation for the sensor you are interested in: