开发者

Disable Backlight Timeout in BlackBerry devices

I'm trying to disable the Backlight Timeout function on BlackBerry device - where the screen automatically dims after a period of inactivity.

The only thing I can do at this moment is go to: Options -> Display -> Screen Components -> Backlight Timeout

and change the time there. The default is 10开发者_运维知识库 seconds and the maximum is 2 minutes.

Does anyone know how to completely disable this Backlight Timeout function with Java code?


to prevent turn off screen for longer than 255 seconds: create TimerTask that enable backlight every 255, and then schedule it using timer:

  class BacklightTimerTask extends TimerTask {
    public void run() {
        Backlight.enable(true, 255);
    }
  }

schedule task

    timer = new Timer();
    timer.schedule(new BacklightTimerTask(), 5000, 5000);


I've found the answer.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜