title: No callbacks being called after Camera.takePicture()
body: <p>After following the steps given by the Android API documentation, I am not getting any callbacks after calling Camera.takePicture() (no shutter callback or image callback).  I have the correct permissions declared in the manifest, I am not getting any exceptions, and I am able to use this code for recording videos.  Similar questions to this issue have been regarding just the <code>Camera.PictureCallback</code> not being called but I haven't found any questions where the <code>Camera.ShutterCallback</code> isn't called.  Here is my code:</p>
  
  <pre><code>    private class CameraPreview extends SurfaceView implements SurfaceHolder.Callback,
              Camera.PictureCallback, Camera.ShutterCallback {
  
          protected SurfaceHolder mHolder;
  
          @SuppressWarnings("deprecation")
          public CameraPreview() {
              super(VideoActivity.this);
              mHolder = getHolder();
              mHolder.addCallback(this);
              // Deprecated setting is required for API &lt; 11
              // Automatically set for API &gt;= 11, no issue with continuing to use it
              mHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
          }
  
          @Override
          public void surfaceCreated(SurfaceHolder holder) {
              Log.d(TAG, "Surface is created");
              try {
                  mCamera = getCamera();
                  Log.d(TAG, "Camera created when surface was created");
                  if(mCamera != null) {
                      mCamera.lock();
                      Camera.Parameters parameters = mCamera.getParameters();
                      parameters.setPictureFormat(ImageFormat.JPEG);
                      mCamera.setParameters(parameters);
                      mCamera.setPreviewDisplay(mHolder);
                      mCamera.startPreview();
                      Log.d(TAG, "Preview Started");
                  }
              } catch(IOException e) {
                  Log.e(TAG, "IOException in setting camera preview: " + e.getMessage(), e);
              }
          }
  
          @Override
          public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) { }
  
          @Override
          public void surfaceDestroyed(SurfaceHolder holder) { }
  
          @Override
          public void onPictureTaken(byte[] data, Camera camera) {
  
              Log.d(TAG, "onPictureTaken called");
              File pictureFile = getOutputMediaFile(MEDIA_TYPE_IMAGE);
              if(pictureFile == null) {
                  Log.e(TAG, "Error creating media file");
                  return;
              }
              Log.d(TAG, "Writing to file: " + pictureFile);
  
              try {
                  FileOutputStream fos = new FileOutputStream(pictureFile);
                  fos.write(data);
                  fos.close();
              } catch (FileNotFoundException e) {
                  Log.e(TAG, "File not found: " + e.getMessage());
              } catch (IOException e) {
                  Log.e(TAG, "Error accessing file: " + e.getMessage());
              }
  
      }
  
      @Override
      public void onShutter() {
          Log.d(TAG, "onShuttter is called");
      }
  }
  </code></pre>
  
  <p>An instance of that class gets initialized in onStart() and is stored in an instance variable called <code>mPreview</code>.  <code>mPreview</code> implements the Camera callback interfaces so I can use them in this way.  The <code>CameraPreview</code> class has been working for recording videos.
  The logic for taking the picture:</p>
  
  <pre><code>mCamera.lock();
  mCamera.takePicture(mPreview, null, mPreview);
  Toast.makeText(VideoActivity.this, "Picture Taken",
          Toast.LENGTH_SHORT).show();
  Log.d(TAG, "Picture Taken");
  </code></pre>
  
  <p>So my question is, why am I not getting any callbacks?</p>