Welcome!

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

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 12
Registered: ‎06-01-2011
My Device: Blackberry Tourch
My Carrier: 3 mobile

Cascades way of keeping the display awake

Hi folks,

 

Does anyone know if there is a cascades way of keeping the display awake.  I am already aware of the flag SCREEN_IDLE_MODE_KEEP_AWAKE, however I am unsure how to use this since I don't have the handle to the screen window.

 

Any assistance appreciated.

Retired
Posts: 499
Registered: ‎05-07-2012
My Device: developer
My Carrier: developer

Re: Cascades way of keeping the display awake

Currently there is no Cascades-specific way to do this.

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

Re: Cascades way of keeping the display awake

If it can't be done with Cascades yet, I think you could probably do it with a ForeignWindow that's a single pixel (if that's allowed), with z level set to put it above the plane of the Cascades (or with a one-pixel hole punched in the Cascades window to let it show through).

Set KEEP_AWAKE on that window and I would expect it to have the desired effect. If that works, you might even be able to make it transparent and in one corner, and no one will ever know it's there...

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!
Developer
Posts: 62
Registered: ‎03-31-2012
My Device: Playbook
My Carrier: None

Re: Cascades way of keeping the display awake