Android: prevent display from turning off

前端 未结 4 1471
囚心锁ツ
囚心锁ツ 2021-01-02 10:05

I\'ve written a small game, that is only controlled via some sensors. There is no touchscreninput or something similar.

The problem is, that after a few seconds of g

4条回答
  •  庸人自扰
    2021-01-02 10:48

    You can request a WakeLock as specified here: http://developer.android.com/reference/android/os/PowerManager.html

提交回复
热议问题