Le 25/08/2013 00:42, [email protected] a écrit :
> I'm making a app for firefox os that have some timers in it so i don't want 
> that the phone get lock after the normal time.
>
> So i want to know if is there a way that i could prevent when my app is open 
> that the phone could lock?
>
> There have to be a way but i after looking around for 20min i prefer to ask 
> people now.
>

Hi,

you probably want WakeLock for the "screen" resource. see [1] for more
information.

Note that you should also listen for PageVisibility events and unlock
when you're hidden, and relock when you're shown again.

[1]
https://developer.mozilla.org/en-US/docs/Web/API/window.navigator.requestWakeLock

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to