Results 1 to 3 of 3
  1.    #1  
    I am trying to develop a timer app. when I call window.setTimeout and the palm screen blanks out my timer stops running. When other apps call window.setTimeout they keep running, does anyone one know anything that can cause this.
  2. spdqbr's Avatar
    Posts
    78 Posts
    Global Posts
    80 Global Posts
    #2  
    I had the same exact problem. setTimeout really doesn't do what you think it might. I ended up going with this to keep the screen from turning off whenever my timer started:

    Code:
    /* Disable screen timeout */
    PreCTAssistant.prototype.activityStart = function(){
        this.controller.stageController.setWindowProperties(
                   {
                      blockScreenTimeout: true
                   }
                );
    }
    
    /* Enable screen timeout */
    PreCTAssistant.prototype.activityEnd = function(){
        this.controller.stageController.setWindowProperties(
                   {
                      blockScreenTimeout: false
                   }
                );
    }
    Just be sure to call activityEnd!
  3.    #3  
    blockScreenTimeout works as long as your app is in the foreground. If you app goes to the background the screen will still timeout.

Posting Permissions