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
Highlighted
Developer
Posts: 123
Registered: ‎01-11-2013
My Device: BlackBerry z10
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??

Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

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