/** Get instance of a camera here and initialize preview holder */
  public void surfaceCreated(SurfaceHolder holder) {
    try {
      cameraManager.openCamera(holder);

      if (handler == null) {
        handler = new CameraActivityHandler(context, cameraManager);
      }
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
예제 #2
0
 @Override
 public void openCamera() {
   cameraManager.openCamera();
 }