Uploaded image for project: 'Apache Cordova'
  1. Apache Cordova
  2. CB-6838

Battery Plugin needs to be deprecated or fixed

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      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 in the manifest.
      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              bowserj Joey Robert Bowser
            • Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated: