开发者

How to keep screen from locking but maintain dimming functionality?

I would like to be able to keep the android screen from locking in an application. This is not a marketplace application. It is installed on a dedicated tablet.

The only solution I've found is using the Power Manager and using a WakeLock. This way I can kee开发者_StackOverflow中文版p the screen from locking, but it also keeps the screen from dimming thus wasting battery.

What I would like is for the screen to dim and turn off the way it always does, but that it is able to wake up when touched and not require the user to press the power button and unlock.

Is this even possible? How would you do something like this?


The only solution I've found is using the Power Manager and using a WakeLock. This way I can keep the screen from locking, but it also keeps the screen from dimming thus wasting battery.

You are perhaps using the wrong WakeLock. Please read the PowerManager documentation and try a different WakeLock. There are WakeLock versions that support anything from the screen being off, to the screen being dim, to the screen being normal brightness.

Is this even possible?

If the screen is off, it will not respond to touch events.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜