Code example for Camera

Methods: cancelAutoFocusrelease

0
 
  private void releaseCamera() { 
    if (cameraView != null && camera != null) {
      cameraView.setCamera(null);
      cancelAutoFocus(); 
      camera.release();
      camera = null;
    } 
  } 
 
  private void cancelAutoFocus() { 
    try { 
      camera.cancelAutoFocus();
    } catch (RuntimeException e) {
      // Not focusing. 
    } 
  } 
 
  /** 
   * Setup the camera view used for taking pictures. 
   */