Code example for Camera

Methods: startPreview

0
   * Asks the camera hardware to begin drawing preview frames to the screen. 
   */ 
  public synchronized void startPreview() { 
    Camera theCamera = camera;
    if (theCamera != null && !previewing) {
      theCamera.startPreview();
      previewing = true;
      autoFocusManager = new AutoFocusManager(context, camera);
    } 
  } 
 
  /** 
   * Tells the camera to stop drawing preview frames. 
   */ 
  public synchronized void stopPreview() { 
    if (autoFocusManager != null) {
      autoFocusManager.stop();
      autoFocusManager = null;
    } 
    if (camera != null && previewing) {
      camera.stopPreview();