Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Support Keeping the Backlight on #304

Closed
timwindsor opened this Issue Oct 12, 2012 · 8 comments

Comments

Projects
None yet
7 participants
Member

timwindsor commented Oct 12, 2012

Developers need an API to keep the screen from going dark when their app is in the foreground

RonMen commented Oct 12, 2012

Yes. This would be a good feature. For now I added a small video element looping to prevent the screen from going to standby mode but I think this isn't the best method for the future and I think it also consumes a lot of battery.

edyb commented Oct 26, 2012

How did you do this for BB10? I also added a small video element for my Playbook app and it works. However, with BB10 the video looping element does not work. Please respond to let me know how exactly you implemented this in code and where in your app. I am using bbUI.js and jQuery for some of my UI, and have my video loop in the main index.html as a hidden div.

May I know what's the way to prevent a BB10 WebWorks application from going to sleep when running in foreground?

Do I have to use 'run when backgrounded" ?

edyb commented Nov 21, 2012

Yes, the background video element loop works. Also "Run when backgrounded" setting in config.xml also helps, but it won't prevent screen from going off. It will keep your app running but your screen backlight will still go off. Therefore, only way to make sure backlight stays on is to use a continuously looping media element (video) on a setInterval or setTimeout loop in HTML.

jonwebb commented Jul 21, 2013

Any progress on this?

There is an extension for this, just look at the PreventSleep Extension.

Contributor

jeffheifetz commented Jul 21, 2013

Closing as it seems resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment