Expo

Documentation

Hi friend! Meet us at App.js Conf in Krakow, Poland on April 4th and 5th with workshops and talks. Learn more

Sensors

Various APIs for accessing device sensors are included under this umbrella package called expo-sensors.

This API is pre-installed in managed apps. To use it in a bare React Native app, follow its installation instructions.

// in managed apps:
import {
  Accelerometer,
  Barometer,
  Gyroscope,
  Magnetometer,
  MagnetometerUncalibrated,
  Pedometer,
} from 'expo';

// in bare apps:
import {
  Accelerometer,
  Barometer,
  Gyroscope,
  Magnetometer,
  MagnetometerUncalibrated,
  Pedometer,
} from 'expo-sensors';
See documentation for the sensors you are interested in using for more information.