Skip to content
This repository

blackberry.system - info.isPlugged is undefined in 10.0.6.360 #139

Closed
ishneur opened this Issue July 10, 2012 · 5 comments

4 participants

Igor Shneur Jeffrey Heifetz Nukul Bhasin Ken Wallis
Igor Shneur
  1. Run the attached app
  2. Click on addEventListener('batterystatus', onBatteryStatusChangeOne)
  3. Plug the device in to a power source

Expected: batterystatus event is triggered
Actual: batterystatus event is not triggered

  1. Change the battery level by charging or draining the battery (on a real device), or modify StateOfCharge in the file pps/services/power/battery on the simulator's file system

The battery level (info.level) is shown correctly, but the battery status (info.isPlugged) is undefined: https://github.com/downloads/blackberry-webworks/BB10-WebWorks-Framework/batterystatus.jpg

On the file system, in the file /pps/services/power/charger, the field ChargingState is missing for both simulator and real device. When I add this field on the simulator and set it to DC, then the batterystatus event is triggered and info.isPlugged becomes "true". This is probably why info.isPlugged is undefined and batterystatus is not triggered when connecting to a power source.

Attachment: https://github.com/downloads/blackberry-webworks/BB10-WebWorks-Framework/GHI139.zip
SCM build: 1.0.1.3
Device/simulator build: 10.0.6.360

Nukul Bhasin
nukulb commented July 12, 2012

@kwallis - the pps object seems to have changed, I doubt we can fix this in time for this release. Do you think it's gating? Wecan try to fix it today of you think it's gating.

Ken Wallis
Owner
Jeffrey Heifetz

@ishneur this has been fixed, correct?

Jeffrey Heifetz

Clearing milestone for now

Igor Shneur

Tested on 10.0.9.2448 and it works now.

Jeffrey Heifetz jeffheifetz closed this January 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.