Battery level and charging state
Reads battery percent and whether the phone is plugged in, with no prompt.
In one line
Can see your battery percent and if the phone is charging, with no prompt
Reads battery percent and whether the phone is plugged in, with no prompt.
Shows routine (charging overnight at home) and pairs with other signals to track a device. Apps use it for power-aware sync; Olejnik et al. showed level and discharge time can tag a device briefly.
What it can and can't do
What the user does: Nothing. The app checks while it is open
It can
- See your battery level from 0 to 100
- See if the phone is plugged in and whether it is on a charger, USB or wireless (Android)
- Watch the level change while the app is open
- Use it to change app behavior, such as pausing downloads
It cannot
- See battery health or cycle count
- Get a real level in the iPhone simulator, which returns minus one
- See your level on iPhone unless it turns monitoring on first
- Show your exact reading to others by itself
How it differs between platforms: Android shares the level through a system broadcast. iPhone apps must turn on battery monitoring first.
On Android and iPhone
| Android | iPhone | |
|---|---|---|
| Status | Supported | Supported |
| First version | Android 1.0 (API 1) | iOS 3.0 |
| Permission or entitlement | Not listed | Not listed |
| Protection level | none | none |
| How access is granted | none | none |
| What the user sees | Not listed | Not listed |
| How long it lasts | Not listed | Not listed |
| How to take it back | Not listed | Not listed |
| Store policy | None listed | None listed |
| API | ACTION_BATTERY_CHANGED sticky broadcast; BatteryManager.getIntProperty(BATTERY_PROPERTY_CAPACITY) (API 21) | UIDevice.batteryLevel, batteryState; set isBatteryMonitoringEnabled = true |
| Notes | Level is integer 0 to 100; plugged type AC, USB, wireless | Returns -1.0 in the simulator or when monitoring is off |
Data you get
What comes back: Battery level and plug state
Shape: float
How often: On change (broadcast or notification)
| Field | Type | Unit | Range | Precision |
|---|---|---|---|---|
level | integer | percent | 0 to 100 | 1 percent steps |
ios_battery_level | float | fraction | -1.0, 0.0 to 1.0 | 1 percent steps (pre iOS 8: 5 percent) |
state | enum | None | unplugged, charging, full, unknown | 4 values |
Technical limits
- No prompt on either platform
- Fingerprint use is time limited because the level changes
The story
What it is
An app can see your battery percent and whether you are charging.
For you
You never get asked. The app might delay a big download until you plug in. It might also learn that you charge overnight at home.
For makers
Makers use it for smart syncing and to avoid draining your phone. Combined with other signals, battery level and charge state can tag a device for a short time.
Where you see it
| Type | Example | Apps |
|---|---|---|
| games | A game lowers frame rate and effects when your battery is below 20 percent. | None named |
| media | A video app offers to download shows only while you are plugged in. | None named |
| fitness | A running app warns you that your battery may not last the whole workout. | None named |
| maps | A navigation app suggests plugging in because your battery is low on a long trip. | None named |
| ads | An ad firm adds battery level to a short term device signature. | None named |
| rideshare | A ride app tells a driver to charge before accepting a long trip. | None named |
Risks
- Shows your routine
- Can help tag a device
Android and iPhone in short
- Android: Read through a standard broadcast with no permission.
- iPhone: Read through UIDevice battery monitoring, with no prompt.
Good uses and abuse
Legitimate uses
- Defer sync on low battery
- Show charge reminders
Known abuse
- Short-lived device tag
- Infer home location from charging times
Scores
| Score | Value | Meaning |
|---|---|---|
| Sensitivity | 1 of 5 | How revealing the data is |
| Utility | 3 of 5 | How useful it is to honest apps |
| Friction | 0 of 5 | How much the user has to do |
| Fingerprint bits | 2 | Rough identifying entropy, when known |
History
- 2014-09, iPhone iOS 8: Battery level moved from 5 percent to 1 percent steps
- 2015-10, Android 5.0 (API 21): BATTERY_PROPERTY_CAPACITY property added
Related capabilities
Related
- Battery health, temperature and cycle count. Can see battery health and charge cycles on Android 14 and newer, but not on iPhone
- Low Power Mode and Battery Saver. Can tell if Battery Saver or Low Power Mode is on, but cannot change it
Same idea on the web
- Battery Status. Can see your battery level and charging state, with no prompt in Chrome
Sources
How well checked: Checked against real behavior.