@Override public void onPictureTaken(byte[] data, Camera camera) { Log.d("run", "into picture call back"); mHandleTask = new HandlePicAsyncTask(); mHandleTask.execute(data); Log.d("run", "execute asynctask"); }
@Override protected void onPause() { super.onPause(); if (mHandleTask != null) { if (mHandleTask.cancel(true)) ; } if (mCamera != null) { mCamera.setPreviewCallback(null); mCamera.stopPreview(); mCamera.release(); mCamera = null; mPreviewing = false; Log.d("mPreviewing", "mPreviewing changed to :" + mPreviewing); } orientationEventListener.disable(); }