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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Native Development

Reply
Contributor
darkstorm1308
Posts: 12
Registered: ‎06-01-2011
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.

Please use plain text.
BlackBerry Development Advisor
smacmartin
Posts: 499
Registered: ‎05-07-2012
My Carrier: developer

Re: Cascades way of keeping the display awake

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

Please use plain text.
Developer
peter9477
Posts: 5,616
Registered: ‎12-08-2010
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 -- (PlayBook 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!
Please use plain text.
Developer
BikeAtor
Posts: 62
Registered: ‎03-31-2012
My Carrier: None

Re: Cascades way of keeping the display awake

Please use plain text.