title: 'Pause' activity while waiting for PictureCallback to occur
body: <p>I'm building an Android app where I would like to wait for the PictureCallback to occur before the calling activity continues.</p>
  
  <pre><code>import android.hardware.Camera;
  
  private Camera camera
  private Bitmap picture;
  
  camera.takePicture(null, null, new PictureCallback() {
    @Override
    public void onPictureTaken(byte[] data, Camera camera) {
      BitmapFactory.Options options = new BitmapFactory.Options();
      options.inSampleSize = 1;
      picture = BitmapFactory.decodeByteArray(data , 0, data.length, options);
    }
  }
  
  ... do some other logic with picture
  </code></pre>
  
  <p>I would like to keep the other logic seperated and thus I would like to avoid coding this in the takePicture function.</p>
  
  <p>Is it possible to accomplish this?</p>