4 ms·
I really doubt advertisers will make their ads less resource-hungry (and therefore less noticeable/appealing) when they detect low battery levels just because i
by elaus 9y ago
I really doubt advertisers will make their ads less resource-hungry (and therefore less noticeable/appealing) when they detect low battery levels just because it would be better for the user (albeit worse for themselves).
- dspillett 9y agoThe use case is for kiosk style applications to be able to give warnings to the user. Or for other apps to take extra precautions such as saving copies of dynamic state to non-volatile locations in case the power fails completely. Though a battery percentage is not really useful for this as it could mean many things. My current main phone at 25% could last until tomorrow quite easily, my previous main device had at most a couple of hours left at that point. A simple "warning level" API would be more useful, allowing the app to register for events like "less than one hour of power left", "power loss likely in the next ten minutes", "entering super-power-saver mode" & "manual shut-down starting" and/or poll for the same flags. That way the device, which is much better placed to monitor such properties, can manage the warning levels perhaps with an off switch in case users don't want apps to know. Of course, you might have to enforce limited resource use in response to low power events, and you shouldn't allow much time between emitting "entering super power saver" events and actually entering the mode (which will shut off browser tasks until the mode is left). So while there is a valid use case, that doesn't rely on trusting advertisers or other hogs to do something nice, the API as wasn't fit for that purpose and making something that is might be more complicated than you'd first think (so perhaps not worth the effort for the few apps that would actually make use of it).
- disconnected 9y ago> Or for other apps to take extra precautions such as saving copies of dynamic state to non-volatile locations in case the power fails completely. The system can crash, hang, forcefully reboot or otherwise die at any moment, without warning. All it takes is one "oopsy", for the phone to hit the ground and the battery to fly off. If there is important data that needs to be preserved, applications should already be committing it to non-volatile locations periodically.
- jerf 9y agoActually, it's trivial to prove advertisers will ignore it: If the API actually became popular, ad blocker plugins would override it to always return the low battery status. Ad networks would respond to that by ignoring it. And now it's a zombie API. The moral of the story is that Web API development is now driven at least partially by "How will advertisers abuse this new API?", and probably will be moreso over time, and that has, ahhh, interesting interactions with the forces pushing the browser into being the universal VM platform.
- eli 9y agoI don't really follow this logic. Wouldn't ad blocker plugins block ads and therefore nothing about battery status is sent either way?
- jerf 9y agoDefense in depth; you can't count on ads getting blocked so you also work to make the environment as hostile to them in other ways as well. If you've got something as easy as forging a single number, you take it for the ads that may still get through.