public void start(){
  if (cameras != null) {
    CameraDescriptor camera=cameras.get(currentCamera);
    CameraView cv=getPreview(camera);
    if (cv.isAvailable()) {
      open();
    }
  }
}

public void start ( ) { if ( cameras != null ) { CameraDescriptor camera = cameras . get ( currentCamera ) ; CameraView cv = getPreview ( camera ) ; if ( cv . isAvailable ( ) ) { open ( ) ; } } }
call this from onstart ( ) of an activity or fragment , or from an equivalent point in time . if the cameraview is ready , the preview should begin ; otherwise , the preview will begin after the cameraview is ready .
