News for hackers. Stuff that matters.
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by legulere on Tuesday July 07, 2015 @07:35AM (#9844762)
Why would you even give websites that info?
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by edent on Tuesday July 07, 2015 @08:09AM (#9844891)
Just off the top of my head...

- Disable the HTML5 Vibration API if battery power is low.

- Increased network activity is battery is full or charging.

- Project how much time a user has to complete an activity before the battery runs out.

- Change page colour scheme to reduce battery drain.

This is a really useful API - especially if it reduces "range anxiety" for mobile users.

Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by mrob on Tuesday July 07, 2015 @08:42AM (#9845030)
- Vibration should be disabled by the OS, not the apps.

- Network activity should be as predictable as possible, because people often have to pay by the megabyte, and any "smart" changes in activity increase the chance that people will be unpleasantly surprised.

- The OS should predict remaining battery life, not the apps. If there's going to be a new API it should let the apps inform the OS of future activity so the OS can make better predictions.

- Changing color to reduce battery drain only makes a noticeable difference with OLED. It will annoy the more common LCD users for no benefit to them.

Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by nsgi on Tuesday July 07, 2015 @01:11PM (#9846688)
It also assumes lower battery power always means you want lower power consumption. You could have a full battery but not have a charger with you and want to make it last as long as possible.
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by userbinator on Tuesday July 07, 2015 @08:29AM (#9844970)
All of those are features the OS should manage. In particular, estimating runtime is a function laptops have had since they existed.
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by nilliams on Tuesday July 07, 2015 @08:06AM (#9844884)
You wouldn't necessarily.

Main use-case I believe was FirefoxOS -- at least the first time I heard it mentioned was during an FirefoxOS talk where they discussed other hardware-y APIs and trying to get them standardised.

It would also be useful for an OS that supported HTML5 native apps. Additionally having a standard API gives projects like Phonegap an API to 'target' when exposing native device APIs to JavaScript.

Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by smackfu on Tuesday July 07, 2015 @10:26AM (#9845620)
Yeah, this was part of WebAPI back in 2012, and that has a lot more hardware APIs:

https://wiki.mozilla.org/WebAPI

Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by madawan on Tuesday July 07, 2015 @07:50AM (#9844820)
So that applications can go light on the battery if needed? For example disabling thumbnails and sound, having longer polling intervals, ...
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by 0x0 on Tuesday July 07, 2015 @07:50AM (#9844819)
I'm having a hard time imagining any legitimate use cases for this API at all.
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by raarts on Tuesday July 07, 2015 @09:36AM (#9845302)
The Great Suspender uses this.
Re:A Privacy Analysis of the HTML5 Battery Status API [pdf] by Vexs on Tuesday July 07, 2015 @09:51AM (#9845398)
Does it really? That's neat- it's one of the few extensions that can actually curb chrome's memory eating without being intrusive.