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

Posts: 587
Registered: ‎04-01-2009
My Device: Z10, PlayBook
My Carrier: NA

Running code in standby mode / avoiding standby mode

I have an app named "Alarm Clock":




A user emailed me today to say that they were expecting the alarm to fire even when the PlayBook was in standby mode.  While I realize that the first party alarm clock apps on BB phones and PlayBook do this, I didn't realize that third party apps could accomplish this as well. But as this user points out, other alarm clock apps do this. Does anyone happen to know how to do that?


What I have been doing is:


NativeApplication.nativeApplication.systemIdleMode = flash.desktop.SystemIdleMode.KEEP_AWAKE;


What that does prevents the screen from turning off / the PlayBook from going into standby mode, except if they manually do it by pressing the power button or touching the battery icon and then touching "Standby".



Posts: 6,473
Registered: ‎12-08-2010
My Device: PlayBook, Z10
My Carrier: none

Re: Running code in standby mode / avoiding standby mode

Look into the QNXSystemPowerMode stuff: https://developer.blackberry.com/air/apis/qnx/system/QNXSystem.html

Peter Hansen -- (BB10 and dev-related blog posts at http://peterhansen.ca.)
Author of White Noise and Battery Guru for BB10 and for PlayBook | Get more from your battery!