title: Android - Camera intent low bitmap quality
body: <p>When taking a picture using the android camera Intent, I get a low-quality bitmap image. I was wondering if it is possible to make this image decent quality.</p>
  
  <p>I googled some information about it and I think that I have to use 'EXTRA_OUTPUT' (<a href="http://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE" rel="noreferrer">http://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE</a>)</p>
  
  <p>I am struggling because I don't know where to place it and I don't know if it will solve my problem.</p>
  
  <p>After pressing btnTakePhoto, I change layout and open the android camera. The bitmap shows up in a second layout (low quality).
  Here is my code:</p>
  
  <pre><code>import android.content.Intent;
  import android.graphics.Bitmap;
  import android.provider.MediaStore;
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.ImageButton;
  import android.widget.ImageView;
  
  public class Camera extends AppCompatActivity {
      ImageButton btnTakePhoto;
      ImageView imgTakenPhoto;
      private static final int CAM_REQUEST = 1313;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.camera);
  
          btnTakePhoto = (ImageButton) findViewById(R.id.buttonFoto);
          imgTakenPhoto = (ImageView) findViewById(R.id.genomenFoto);
  
  
      btnTakePhoto.setOnClickListener(new btnTakePhotoClicker());
  }
      @Override
      protected void onActivityResult(int requestCode, int resultCode, Intent data) {
          super.onActivityResult(requestCode, resultCode, data);
  
          if(requestCode == CAM_REQUEST){
              setContentView(R.layout.share);
              Bitmap thumbnail = (Bitmap) data.getExtras().get("data");
              imgTakenPhoto = (ImageView) findViewById(R.id.genomenFoto);
              imgTakenPhoto.setImageBitmap(thumbnail);
          }
      }
  
      class btnTakePhotoClicker implements Button.OnClickListener {
  
          @Override
          public void onClick(View v) {
              Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
              startActivityForResult(cameraIntent, CAM_REQUEST);
          }
      }
  
      //CameraShare layout -- back button - Go back to first layout
      public void ibBackToPhotograph(View v) {
          setContentView(R.layout.camera);
          btnTakePhoto = (ImageButton) findViewById(R.id.buttonFoto);
          btnTakePhoto.setOnClickListener(new btnTakePhotoClicker());
      }
  }
  </code></pre>
  
  <p>EDIT: The image isn't saved anywhere. It's ment to be posted on facebook after you accept it (snapchat)</p>