Code example for Camera

Methods: setPreviewCallbackstopPreview

0
   * Tells the camera to stop drawing preview frames. 
   */ 
  public void stopPreview() { 
    if (camera != null && previewing) {
      if (!useOneShotPreviewCallback) {
        camera.setPreviewCallback(null);
      } 
      camera.stopPreview();
      previewCallback.setHandler(null, 0);
      autoFocusCallback.setHandler(null, 0);
      previewing = false;
    } 
  } 
 
  /** 
   * A single preview frame will be returned to the handler supplied. The data will arrive as byte[] 
   * in the message.obj field, with width and height encoded as message.arg1 and message.arg2, 
   * respectively. 
   * 
   * @param handler The handler to send the message to. 
   * @param message The what field of the message to be sent.