java.Lang.RuntimeException, setParameters failed in android(4.1.1) version

后端 未结 3 1885
慢半拍i
慢半拍i 2021-01-13 16:55

I have developed an application which captures a photo when punch in at the time. It\'s working good on Acer tab(capturing image and saves in sdcard). Now when I run the sam

3条回答
  •  悲哀的现实
    2021-01-13 17:26

    private void flipBackToFrontCamera() {
    
        if (mCamera != null) {
            mCamera.stopPreview();
            mCamera.release();
            mCamera = null;
        }
    
        mCamera = Camera.open(1);
    
        if (mCamera != null) {
            try {
                mCamera.setPreviewDisplay(surfaceView.getHolder());
                mCamera.startPreview();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
    

提交回复
热议问题