Screen Retain unlock when our application is running
Is it possible to make continu开发者_运维问答ously unlocked the screen when our application is running.
You can use WakeLock. But it's not a good solution because you have to acquire and release it manually. And AFAIK it requires a permission. The better solution is to use android:keepScreenOn="true"
for a view which requires screen to be on.
I think that you can do that in xml with this option: android:keepScreenOn="true"...
精彩评论