Skip to content

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

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

4 participants

@ishneur
ishneur commented Jul 10, 2012
  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

@nukulb
nukulb commented Jul 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.

@kwallis
Open Source Projects member
@jeffheifetz

@ishneur this has been fixed, correct?

@jeffheifetz

Clearing milestone for now

@ishneur
ishneur commented Jan 17, 2013

Tested on 10.0.9.2448 and it works now.

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.