How to prevent the screen of an android device to turn off during the execution of an Activity?

后端 未结 6 695
我在风中等你
我在风中等你 2020-12-14 15:32

I have an Activity that usually needs some time to watch the screen without interacting with it.

The problem is that the screen turns off, just like wit

6条回答
  •  执笔经年
    2020-12-14 16:07

    You may want to use the wake-lock to prevent the screen off.Pleas refer http://developer.android.com/reference/android/os/PowerManager.WakeLock.html

提交回复
热议问题