icon-sprite Created with Sketch.
Skip to main content

Mobile


Battery Status API: We Need to Talk

As the browser continues to become more aware of its host device’s capabilities the line between website and application continues to blur. Many people, even those with a decent amount of technical knowledge, are unaware some apps and sites now blend, imperceptibly shifting from app to web and back again.

The ability to access more of your device's information (and therefore more information about you) is coming. The ability for you to be aware of this access and exercise control over these devices is vital. Product owners should be aware of this, and strive to create quality, ethical solutions.

Consider the Battery Status API. This interface allows programmers to access your device’s battery information and manipulate an app based on this data. A common use case would be adjusting an app to wisely expend energy, such as:

  • Automatically lower the quality of a video when the battery is below 25 percent capacity
  • Gracefully decrease the amount the app “talks" to external sources, proportional to battery change
  • Remove or reduce animation when an app is accessed frequently for short periods
  • Shift the color scheme of the app to use darker colors
  • Override all of the above if the device is charging

These are great examples of true Responsive Web Design. It’s an approach that means more than just making your site fit onto a small screen. It’s all about using the capabilities and information your device provides to craft the best experience possible, regardless of when, where, and how it's being used.

Sounds pretty great, right? Well, yes and no.

This technology has spurred some recent, well-founded criticism, namely concerns over privacy. Combined with other device technologies and exploits, the likelihood for harm needs to be considered. Some potential exploits include:

  • An unscrupulous company taking advantage of poorly regulated ad networks to make competitor’s sites drain a device’s battery1
  • Hotels could subtly punish those who don’t use the hotel Wi-Fi network2
  • An organization could purchase highly specific identifying information and use targeted advertising to send messages to shame groups whose behavior they don’t approve of
  • “Undesirable” populations such as refugees or homeless people whose behavior matches a certain profile could be identified
  • Just-in-time attacks could be coordinated on activists, making communication more difficult during a protest
  • A tech-savvy stalker could build a detailed map of a target’s movements, including anticipated behavior

I’m sure there’s far more devious examples out there. But you get the idea.

Ultimately, the ability for others to access your battery’s status is going to continue to roll out, and not much can be done by those who will be affected by it. The imperative is on developers and designers to make mindful, ethical decisions when employing this technology, but not everyone will (unwittingly or otherwise).

Ideally the best experience would be owner empowerment. The person operating the device should be free to make an informed decision and head off potential abuses at the pass, or freely rectify problems after they are discovered.

Companies such as Microsoft, Apple, and Google have historically offered a guiding hand for their customers, giving them control over Wi-Fi, geolocation and Bluetooth and offering good default settings. They, and major non-mobile browsers, inform users when a website or app attempts to access certain aspects of their device.

Chrome screenshot with geolocation notification prompt
Chrome will alert you when a website attempts to access your location.

iOS and Android, the two most popular mobile operating systems, allow users a small degree of control over their battery3. A great user experience would expand on user controls while still maintaining ease of use expected from mobile devices. Sophisticated permissions settings could be distilled into simple, easy-to-understand toggles and notifications.

Following are two prototypes that demonstrate how this could possibly work. Click or tap on the blue areas to interact with the wireframes:

This prototype demonstrates the browser alerting you when a website attempts to access your battery.
This prototype demonstrates how website battery preferences could be managed.

As technology becomes indispensable, trusting its normal operation is paramount. Companies who have betrayed trust by willfully subverting technology for malicious purposes have suffered for it. Crafting positive, intuitive experiences is already important in creating successful digital products. Being mindful of the capabilities of emerging technologies, as well as the nuances of the ramifications they introduce, is critical.


  1. If you’re not already aware, there is a direct correlation between performance and bounce rate

  2. Hotel’s behavior towards customers who don’t buy their internet has historically been less than stellar

  3. In fact, many people were positively delighted upon discovering this feature once they understood what it did for them. 

Sign up for our newsletter


Delivered monthly, featuring great content from our blog!