Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

New Contributor
Posts: 3
Registered: ‎05-17-2011
My Device: Playbook
My Carrier: Playbook

How to addEventListener to Device?

I want to add an eventlistener to device for battery  change.



private var myDevice:Device=Device.device;


 but there are mistakes:

1120,Access of undefined property myDevice

1120,Access of undefined property onLevelChange


How to addEventListener to Device?