This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Expo Battery
A library that provides battery information for the physical device, as well as corresponding event listeners.
expo-battery provides battery information for the physical device (such as battery level, whether or not the device is charging, and more) as well as corresponding event listeners.
Note: On web,
expo-batteryrelies on the Battery Status API, which is only implemented in Chromium-based browsers (Chrome, Edge, Opera). On unsupported browsers,getBatteryLevelAsync()resolves to-1andgetBatteryStateAsync()resolves toBatteryState.UNKNOWN.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
API
import * as Battery from 'expo-battery';
No API data file found, sorry!