cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian LeRoux...@brian.io>
Subject Re: [Android] Proposal: Deprecate/No-Op Battery Plugin
Date Thu, 26 Mar 2015 18:01:24 GMT
this! is really good advice and should make it into our guides.

On Thu, Mar 26, 2015 at 10:42 AM, Josh Soref <jsoref@blackberry.com> wrote:

> 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:
>
> e.g.:
> * 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: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message