title: How to solve different Preview/Picture sizes returned by android.hardware.camera?
body: <p>So I've been playing with the android camera library and using it in a surfaceview. I have found that there's no way to capture pictures that match preview. In fact, one has to always check the preview and picture sizes and set the camera parameters to get the best match possible. Also, you can't just set the camera to have the same sizes for both since the app will crash if the camera doesn't support them.</p>
  
  <p>How can this be? Is there really no other solution? I mean Instagram seems to use it (it doesn't launch the phone's camera app) and there always seems to be a perfect match.</p>
  
  <p>Any ideas? Thanks!</p>