It may be a tad offtopic, but does that mean that every app/widged on
Android suffer from the same issues, including the native ones? It's almost
hard to believe, if it is so.


2014-06-11 17:38 GMT-03:00 Joe Bowser <[email protected]>:

> Just wanting to throw this out there, because I'm sure people are
> wondering how I figured this out:
>
> https://github.com/infil00p/ChargeNotifier
>
> Here's some code for a Charge Notification service in Android.  When
> the battery is low, it does a post to the CouchDB instance.  When I
> did the first run, I discovered that if I left the tablets running
> this code, they would be dead or near dead in an hour or less.  Since
> the point of the app was to get notifications to prevent devices from
> dying (and being unusable), this was a disaster for the project.
> After a while, I decided to shelve the project. However, given that
> our current battery charger code drains the battery, the experience
> here is coming in handy.
>
> On Wed, Jun 11, 2014 at 1:23 PM, Joe Bowser <[email protected]> wrote:
> > On Wed, Jun 11, 2014 at 1:01 PM, Frederico Galvão
> > <[email protected]> wrote:
> >> If two other platforms were able to implement this on a satisfactory
> way, I
> >> don't think this is an issue with the spec per se (although I'm sure a
> >> better spec would help a lot, I agree). And considering there is a
> native
> >> battery charge tooltip on every Android device, I'd say there is a way
> to
> >> subscribe to those in a safer way. With that, wouldn't the Android dev
> >> group/bug tracker be a better place for this feedback (to make it
> easier to
> >> use that safe route)?
> >>
> >
> >
> http://developer.android.com/training/monitoring-device-state/battery-monitoring.html
> >
> http://developer.android.com/reference/android/content/Intent.html#ACTION_BATTERY_CHANGED
> >
> > So, using this, you can tell whether your device is charging and how
> > it's charging, but you can't get numbers without subscribing to the
> > ACTION_BATTERY_CHANGED intent.  If you have a receiver for this
> > intent, it will fire constantly, and this will consume battery.  Not
> > only that, this is one of the few intents that you can't connect a
> > receiver to using the Android Manifest, because of the fact that it's
> > not intended to be used by any process other than the
> > battery indicator.
> >
> > So, the question is what interval won't kill the battery? Honestly, I
> > don't care about the battery at all unless it's low or critical, and
> > Android already has other actions for that, so I'm fine with this not
> > being triggered unless the battery is actually low.  However, this
> > spec requires that we calculate charging and discharging rate as well,
> > which I think is extra information that we don't need.
> >
> > The big problem is that this BatteryManager object has read-only
> > properties that we'd have to pre-populate.  I really dislike this, and
> > would like for this plugin to be entirely async if possible.
> >
> >>
> >> 2014-06-11 15:48 GMT-03:00 Marcel Kinard <[email protected]>:
> >>
> >>> And document why the current implementation is not recommended for app
> >>> developers to use, because people tend to use things that are
> available.
> >>> That’s the short term answer.
> >>>
> >>> The long term answer is to get help from jsoref and others to give
> >>> feedback to the W3C that their spec is unimplementable on the platform
> that
> >>> is the most popular in the market. I’d like to think that with an API
> >>> alignment, Cordova is the [early] implementor of W3C specs like this,
> and
> >>> we should be an invaluable proving ground and source of feedback for
> these
> >>> things. Whether or not the W3C can adjust in a timely manner is another
> >>> question (and not ours to answer), but we should be giving them
> technical
> >>> feedback on our implementation experience.
> >>>
> >>> On Jun 10, 2014, at 6:54 PM, Brian LeRoux <[email protected]> wrote:
> >>>
> >>> > shelve!
> >>>
> >>>
> >>
> >>
> >> --
> >>
> >> *Frederico Galvão*
> >>
> >> Diretor de Tecnologia
> >>
> >> PontoGet Inovação Web
> >>
> >>
> >> ( +55(62) 8131-5720
> >>
> >> * www.pontoget.com.br <http://www.pontoget.com/>
>



-- 

*Frederico Galvão*

Diretor de Tecnologia

PontoGet Inovação Web


( +55(62) 8131-5720

* www.pontoget.com.br <http://www.pontoget.com/>

Reply via email to