RuntimeException on Camera.setParameters() on nexus one

前端 未结 7 1630
遥遥无期
遥遥无期 2020-12-13 02:45

I copied the code from the answer here and I still am getting a RuntimeException: setParameters failed error on my nexus one. My manifest file has camera and wake_lock permi

7条回答
  •  半阙折子戏
    2020-12-13 03:00

    None of the above solved this for me. Adding this code before setting the parameters did though.

    // stop preview before making changes
        try {
            mCamera.stopPreview();
        } catch (Exception e){
            // ignore: tried to stop a non-existent preview
        }
    
    //now set your parameters
    

提交回复
热议问题