开发者

screen goes off while recording and preview gets corrupted

How do you prevent the screen from going off when recording is in process. If recording is in process, and there's no other activity like using arrow keys, or the keypad, the scree开发者_StackOverflown goes off and when it's brought back to life, the preview is corrupted.


What do you mean with "recording in progress"? You have an app that is recording something? The easiest way (which doesn't require any additional permissions) is to give any of your views android:keepScreenOn=true (there's also setKeepScreenOn()).

If you want to be hardcore, you can request a wakelock permission, but that should not be necessary - if you have a UI, keepScreenOn is a much more elegant solution.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜