Code example for Camera

Methods: reconnectreleasestopPreview

0
	 
	public synchronized void stop() { 
		super.stop(); 
		if (camera != null) {
			try { 
				camera.reconnect();
			} catch (Exception e) {
				Log.e(TAG,e.getMessage()!=null?e.getMessage():"unknown error");
			} 
			camera.stopPreview();
			try { 
				camera.release();
			} catch (Exception e) {
				Log.e(TAG,e.getMessage()!=null?e.getMessage():"unknown error");
			} 
			camera = null;
		} 
	} 
 
	// Don't forget to deal with the RuntimeExceptions ! 
	// Camera.open, Camera.setParameter, Camera.unlock may throw one