apache / apache/cordova-plugin-battery-status

Browser implementation is broken

Open
#74 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
105
Forks
143
PR merge metrics
No merged PRs in 30d

Description

The browser implementation of this plugin uses `navigator.getBattery`:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getBattery

> Obsolete
> This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

Current Firefox and Edge don't support it, Chrome still seems to:
https://developer.mozilla.org/en-US/docs/Web/API/Battery_Status_API#Browser_compatibility

As far as I know there is no proper replacement.

Contributor guide

Open the contributing guide

Research direction

Start by locating the browser implementation and its use of navigator.getBattery, then review the linked MDN Battery Status API compatibility information. Done would require an agreed replacement or resolution for unsupported browsers, which the issue does not currently specify.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
web-dev
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.