Preventing the screen from switching off

Hi altogether,

I work on an enyo 2 app for webOS that should keep the screen on for more than just the two or three minutes that are possible to set up.

I suspect that I could use Jason's webOSExt and some service request. Alas, I don't have much experience with pre-enyo-2 development.

Has anybody a code snippet that accomplishes this task?

TIA
Christian

Comments

  • edited March 2013
    I believe that the proper command with Jason's code would be something like:
    enyo.webos.setWindowProperties( { "blockScreenTimeout": true } );
    I haven't used it too much, but looking at the code and my old webOS code, that should be functional.

    Setting the boolean to true would keep the screen on and false to allow normal operation.
  • Thank you! I was thinking of using Janson's service request extension and then a service request to the power manager. Your hint is a lot easier. And it even does not need Jason's code (sorry, Jason :)
    window.PalmSystem.setWindowProperties({"blockScreenTimeout":true});
Sign In or Register to comment.