This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
This is documentation for the next SDK version. For up-to-date documentation, see the latest version (SDK 57).
Expo Magnetometer
A library that provides access to the device's magnetometer sensor.
Android
iOS
Included in Expo Go
Magnetometer from expo-sensors provides access to the device magnetometer sensor(s) to respond to and measure the changes in the magnetic field measured in microtesla (μT).
You can access the calibrated values with Magnetometer and uncalibrated raw values with MagnetometerUncalibrated.
Installation
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Magnetometer
API
import { Magnetometer, MagnetometerUncalibrated } from 'expo-sensors';
No API data file found, sorry!