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

Reply
Developer
CapQNX
Posts: 101
Registered: ‎01-11-2013
My Device: BlackBerry Curve
My Carrier: Docomo

How to keep on screen light

I want to keep the screen light on till my application is running. Any idea how i can do that??

Please use plain text.
Developer
Zmey
Posts: 1,510
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: How to keep on screen light

#include <bb/cascades/Window>
Application::instance()->mainWindow()->setScreenIdleMode(ScreenIdleMode::KeepAwake);

 

This link has more info on other methods:

http://supportforums.blackberry.com/t5/Cascades-Development/prevent-a-screen-lock/m-p/2100313#M11757


Andrey Fidrya, @zmeyc on twitter
Please use plain text.