Closed Bug 727477 Opened 12 years ago Closed 12 years ago

Battery API: On Galaxy Nexus, the Battery API reports "charging" and "full" even if not full and not plugged


(Core Graveyard :: Widget: Android, defect)

Not set


(firefox10 wontfix, firefox11 affected, firefox12 affected, firefox13 fixed)

Tracking Status
firefox10 --- wontfix
firefox11 --- affected
firefox12 --- affected
firefox13 --- fixed


(Reporter: paul, Assigned: mounir)


(Whiteboard: mwc-demo)


(1 file)

I use this code:

It works on HTC Desire HD + IRC.
On Galaxy Nexus, I get "level: 1, charging: true;" what ever the status of the battery is (plugged on not plugged, charged or not charged).
I've been told that by someone from dev engagement but I don't have a Galaxy Nexus.

What do you mean by HTC Desire HD + IRC?
Component: General → DOM: Device Interfaces
OS: Linux → Android
QA Contact: general → device-interfaces
Hardware: x86_64 → All
Assignee: nobody → doug.turner
Component: DOM: Device Interfaces → General
OS: Android → Linux
Hardware: All → x86_64
(sorry, I meant ICS, not IRC)
Yes, I've seen the same thing on Galaxy Nexus, and like Doug pointed out, it seems to be due to a bug at their end.
WONTFIX since our code works.  Please subscribe to the google bug if you are interested.
Closed: 12 years ago
Resolution: --- → WONTFIX
I prefer to reopen it because I guess there is a way to get the battery information on this phone a way or another given that likely the battery widget is working.
I will buy a Galaxy Nexus next week when back in Paris and have a look at that. Reopening and assigning to myself for that.
Assignee: doug.turner → mounir
OS: Linux → Android
Hardware: x86_64 → All
Resolution: WONTFIX → ---
WebAPI Web app includes the battery API in the demo.  Adding the whiteboard mwc-demo because of this.
Whiteboard: mwc-demo
Attached patch PatchSplinter Review
This should work around the low level issue.

BTW, it's not an ICS issue. I tried with a Nexus S with ICS and things were working nicely.
Attachment #599181 - Flags: review?(doug.turner)
Comment on attachment 599181 [details] [diff] [review]

Review of attachment 599181 [details] [diff] [review]:

if there are more devices that need to be special cased, we can factor that test out into its own function.
Attachment #599181 - Flags: review?(doug.turner) → review+
Pushed to m-c:

Should we take this fix to Firefox 11 and/or 12 given that it's really safe and will prevent people from complaining that this new feature we might advertise doesn't work on their phones?
Closed: 12 years ago12 years ago
Component: General → Widget: Android
QA Contact: device-interfaces → android
Resolution: --- → FIXED
Target Milestone: --- → mozilla13
Blocks: 728249
No longer blocks: 728249
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.