Code example for SurfaceHolder

Methods: removeCallback

0
		releaseCamera(); 
 
		if (mCameraPreview != null) {
			final SurfaceHolder holder = mCameraPreview.getHolder();
			if (holder != null) {
				holder.removeCallback(mCameraPreview);
			} 
		} 
 
		//Sensor 
		mSensorManager.unregisterListener(this);
 
		super.onPause(); 
	} 
 
	/** 
	 * release camera properly 
	 */ 
	private void releaseCamera() { 
		if (mCamera != null) {
			mCamera.release();        // release the camera for other applications