cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Soref <>
Subject RE: [Android] Proposal: Deprecate/No-Op Battery Plugin
Date Thu, 26 Mar 2015 17:42:20 GMT
Andrew wrote:
> Let's just update the README to state that "the battery plugin is a plugin
> that uses your battery" :)

I'm +1 on this

> Only half joking... probably would be minimal effort and enough to just add
> a warning about this and do nothing more.

it's not a joke, old battery apis (and probably on other platforms too, i can't remember which)
really are harmful.

plus, it's rarely the right thing to do.

app developers should really be event driven:

* gaining network connection to their uplink
* having sufficient data to justify sending
* receiving a notice (e.g. a push) that they have data to fetch

and they should use some local storage cache for everything else.

* they should be resilient to users reseting their devices (power cycle, os OTA, battery pull,
device kernel panic).
* they should be resilient to users choosing to go into airplane mode for a 10 hour flight
and running out of battery before disembarking.

a battery api doesn't help w/ these things. being event driven does.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message