Android - cam.setPreviewDisplay(holder) running into IOError

前端 未结 2 1119
长发绾君心
长发绾君心 2021-01-03 16:33

I am trying to use the camera\'s image as part of live wallpaper.

In the Engine that I declared, I have this code:

public class Class extends Wallpa         


        
2条回答
  •  一向
    一向 (楼主)
    2021-01-03 17:03

    I have seen the following gotcha giving me java.io.IOException: setPreviewDisplay failed:

    If you do both video and photo, there are two functions, camera.unlock() and camera.reconnect(). You must camera.unlock() before recording a video and camera.reconnect() before taking a photo.

提交回复
热议问题