You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Jesse MacFadyen (JIRA)" <ji...@apache.org> on 2014/05/30 23:54:02 UTC
[jira] [Commented] (CB-6838) Battery Plugin needs to be completely
re-written
[ https://issues.apache.org/jira/browse/CB-6838?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14014267#comment-14014267 ]
Jesse MacFadyen commented on CB-6838:
-------------------------------------
I recently fixed several issues in the wp8 version of the plugin.
The spec has been updated, and there are numerous improvements. We should probably tie those efforts together.
> Battery Plugin needs to be completely re-written
> ------------------------------------------------
>
> Key: CB-6838
> URL: https://issues.apache.org/jira/browse/CB-6838
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Reporter: Joe Bowser
> Assignee: Joe Bowser
>
> While investigating the Battery Plugin, I've discovered quite a few issues with it that tells me that this will never actually work:
> 1. This listens to BATTERY_CHANGED. We can never listen to this Broadcast because the battery ALWAYS changes and this will drain the battery. Android explicitly prevents this event from being listened to
> 2. We don't set up a BroadcastReceiver for BATTERY_LOW, BATTERY_CHARGED
> 3. We have no idea whether the phone is plugged into an AC Adapter or a Computer, this is important information to have.
> I think that it's probably a good idea for this plugin to be completely re-written.
--
This message was sent by Atlassian JIRA
(v6.2#6252)