How to Check Battery Level in Your Expo App

DavidDavid November 9, 2026 6 min read
A smartphone standing upright on a concrete desk in warm window light, its dark screen glowing green at the bottom like a filling battery, with a white charging cable coiled beside it
Original image, App Store Launch Club

How to check battery level in your Expo app, in short

Install expo-battery, import useBatteryLevel, and render the value. It is a number between 0 and 1, so 0.76 means 76 percent. If the device cannot report a level, you get -1, and your UI has to handle that instead of showing a negative number.

The same module also tells you whether the phone is charging and whether Low Power Mode (iOS) or Power Saver (Android) is on. That last one is the piece most apps should actually use. A raw percentage is rarely useful inside your app, because the user already sees it in the status bar. Knowing they want to save power is something you can act on.

expo-battery at a glance (SDK 58)

QuestionAnswer
Installnpx expo install expo-battery
PlatformsAndroid, iOS (physical device only), Web
Works in Expo Go?Yes
Permissions neededNone
Level format0 to 1, or -1 if unknown
Easiest APIuseBatteryLevel, useBatteryState, useLowPowerMode, usePowerState
iOS simulator?No, isAvailableAsync returns false there

Step 1: Install expo-battery

Run npx expo install expo-battery. On SDK 58 that gives you the 58.0.x line. Using npx expo install instead of a plain npm install matters here, because it picks the version that matches your SDK.

This module is included in Expo Go and needs no permission prompt and no config plugin, so you can try it right away. That makes it one of the easiest native features in the whole series. You still ship it to users in a normal [EAS build](/blog/eas-build-guide-for-expo-apps), but there is no native setup to forget.

Step 2: Read level, charging state and power mode with hooks

In a component, the hooks are the cleanest path because they subscribe and clean up for you. There are four:

The four expo-battery hooks

HookReturnsUse it for
useBatteryLevel()A number from 0 to 1, or -1Showing a level, or a low battery warning
useBatteryState()A BatteryState valueKnowing if the phone is plugged in
useLowPowerMode()true or falseCutting heavy work when the user wants to save power
usePowerState(){ batteryLevel, batteryState, lowPowerMode }Getting all three in one object

BatteryState is an enum with five values: UNKNOWN (0), UNPLUGGED (1), CHARGING (2), FULL (3) and NOT_CHARGING (4). Compare against the names, never the numbers. NOT_CHARGING is Android only and means power is connected but the battery is not charging, for example when the phone limits charging to protect the battery. iOS never returns it, so do not build an iOS feature around it.

Outside a component, such as in a plain helper or before a big upload, use the async versions: getBatteryLevelAsync, getBatteryStateAsync, isLowPowerModeEnabledAsync, or getPowerStateAsync for all three at once. One detail on getPowerStateAsync: if any part of the read fails, it throws. Wrap it in try and catch so a battery read can never crash the flow it is guarding.

Step 3: Use Low Power Mode, not the percentage

Here is the part most tutorials skip. Picking your own cutoff like "below 20 percent, turn things off" is a guess about what the user wants. Low Power Mode is the user telling you directly. When it is on, they have already chosen battery over polish, and your app should respect that.

  • Pause autoplay video and looping animations, and show a play button instead.
  • Delay large downloads, image prefetching and non-urgent syncs until power mode turns off or the phone is charging.
  • Lower the accuracy or frequency of [location](/blog/how-to-add-location-to-your-expo-app) updates if your app tracks them.
  • Skip optional extras like confetti, heavy haptics or a live map preview.

Our take: treat useLowPowerMode as the default switch for any "nice to have" that costs power, and only use the level for one thing, a clear warning before a long task. If the user is about to start a recording or a big export at 5 percent and not charging, telling them first is genuinely helpful. Nagging them at 40 percent is not.

Step 4: Know when the events actually fire

If you use listeners directly with addBatteryLevelListener, addBatteryStateListener or addLowPowerModeListener, each returns a subscription. Call remove() on it when the screen unmounts, or you leak listeners every time the screen opens. The hooks do this for you, which is the main reason to prefer them.

The level listener behaves very differently by platform, and this is where people decide the module is broken:

When the battery level event fires

PlatformLevel listener fires when
iOSThe level drops by 1 percent or more, at most once per minute
AndroidOnly when the battery crosses into the system's low state, or recovers out of it
WebNever

So on Android, a live percentage that updates every few points will not come from the listener. If you truly need a fresh number, read getBatteryLevelAsync at the moment you need it, for example when a screen opens or right before a long task. The charging state and power mode listeners are more useful in practice: they fire when the user plugs in, unplugs, or toggles power saving.

Step 5: Check battery optimization on Android

expo-battery has one Android only extra that matters if your app does work in the background: isBatteryOptimizationEnabledAsync. On Android 6.0 and later, when battery optimization is on for your app, background work can be affected once the phone enters doze mode, its deep idle state.

If you use [background tasks](/blog/how-to-run-background-tasks-in-your-expo-app) and Android users report that syncs stop overnight, check this value and show it on a debug or support screen. That turns a vague "it stopped working" report into a concrete answer. Our take: do not pester users to turn optimization off unless your app genuinely depends on it. Most apps should be designed to work fine when background work is delayed.

Have Claude Code build it for you

Open your project in the Claude Code desktop app and describe what you want the app to do with battery information, not just "show the battery". Left alone, AI-written code tends to poll the level on a timer, forget the -1 case, or build features on NOT_CHARGING that never fire on iOS. A prompt that heads those off:

The 0.1 in that prompt is our choice, not a rule from the system. Change it to whatever fits your task. Then add a line to your [CLAUDE.md](/blog/claude-md-for-expo-apps) such as "Battery: respect Low Power Mode via usePowerSaving, never poll the level" so a later session keeps the same behavior.

The short version

To check battery level in your Expo app: install expo-battery, use useBatteryLevel for the level, useBatteryState for charging, and useLowPowerMode for the signal that actually changes behavior. Handle -1, test on a real device, and remember that Android only fires level events at the low battery threshold.

If you are building your first iOS app with Claude Code and Expo and want feedback on it before App Review, bring it to App Store Launch Club. Members share their builds and help each other get unstuck, and the [curriculum](/curriculum) covers the full path from first build to first users. If you are tuning how your app behaves on a real phone, our guide to [keeping the screen awake](/blog/how-to-keep-the-screen-awake-in-your-expo-app) pairs well with this one. Join at applaunchclub.co for $9 a month.

Free app-building tips, straight to your inbox

Short, practical drops on app ideas, validating fast, store listings, and passing app review. No spam, unsubscribe anytime.

Frequently asked questions

How do I get the battery level in Expo?

Install expo-battery with npx expo install expo-battery, then call useBatteryLevel() in a component or await getBatteryLevelAsync() anywhere else. Both give a number from 0 to 1, or -1 if the device cannot report it.

Why does expo-battery return -1?

-1 means the device does not provide a battery level. The most common case is the iOS simulator, where isAvailableAsync returns false. Test on a physical device, and treat -1 as unknown in your UI.

Does expo-battery work in Expo Go?

Yes. It is included in Expo Go and needs no permissions or config plugin. You still need a real device on iOS, because the simulator has no battery to read.

How do I detect Low Power Mode in an Expo app?

Use the useLowPowerMode hook or isLowPowerModeEnabledAsync from expo-battery. It reports Low Power Mode on iOS and Power Saver on Android. On web and older Android devices that do not report it, the value is always false.

Why is my battery level listener not firing on Android?

On Android, the level listener only fires when the battery drops into the system's low state or recovers out of it, not on every percent. Read getBatteryLevelAsync when you need a current number. On iOS it fires when the level drops by 1 percent or more, at most once per minute.

Do I need a permission to read battery level?

No. expo-battery does not require a permission prompt on iOS or Android.

Last reviewed by David on November 9, 2026

David

Written by

David

Founder and app builder

Keep reading

ExpoClaude Code

How to Add Notification Actions to Your Expo App

To add notification actions to an Expo app, register a category with Notifications.setNotificationCategoryAsync, give it action buttons (and optionally a text reply), set categoryIdentifier on the notification, then read response.actionIdentifier in a response listener. Here is every action option, how to handle taps when the app was closed, the Android and iOS differences, and a Claude Code prompt that wires it all up.

David 8 min
Read article
ExpoClaude Code

How to Schedule Local Notifications in Your Expo App

To schedule local notifications in an Expo app, install expo-notifications, set a notification handler, ask for permission, create an Android channel, then call scheduleNotificationAsync with your content and a trigger like DAILY, WEEKLY or DATE. Here is every trigger type, how to cancel and list what is scheduled, why Android reminders arrive late, and a Claude Code prompt that builds the whole reminder flow.

David 8 min
Read article

Ready to build it yourself?

Join App Store Launch Club, the #1 community for building and launching apps, for $9/month.

← Back to the blog