title: How can I take a photo from Camera with full size? (Android Java)
body: <p>I can't take a picture from the camera and then store it as a Bitmap object. I can only find solutions where I get thumbnail as Bitmap. How can I do this? </p>
  
  <p>Here is the code:</p>
  
  <pre><code>public boolean pickImageFromCamera(View View) {
  
      Intent intent = new Intent("android.media.action.IMAGE_CAPTURE");
      File photo;
      try
      {
          // place where to store camera taken picture
          photo = this.createTemporaryFile("picture", ".jpg");
          photo.delete();
      }
      catch(Exception e)
      {
  
          System.out.println("ERROR TAKING PICTURE");
          return false;
      }
      mImageUri = Uri.fromFile(photo);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, mImageUri);
      //start camera intent
      activity.startActivityForResult(intent, REQUEST_CODE2);
  
  
      return true;
  }
  
  
  private File createTemporaryFile(String part, String ext) throws Exception
  {
      File tempDir= Environment.getExternalStorageDirectory();
      tempDir=new File(tempDir.getAbsolutePath()+"/.temp/");
      if(!tempDir.exists())
      {
          tempDir.mkdirs();
      }
      return File.createTempFile(part, ext, tempDir);
  }
  
  public void pickImageFromFolder(View View) {
      Intent pickPhoto = new Intent(Intent.ACTION_PICK,
              android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
      startActivityForResult(pickPhoto , REQUEST_CODE);//one can be replaced with any action code
  }
  
  @Override
  protected void onActivityResult(int requestCode, int resultCode, Intent data) {
  
      if (requestCode == REQUEST_CODE2 &amp;&amp; resultCode == Activity.RESULT_OK)
          try {
              // We need to recyle unused bitmaps
              if (bitmap != null) {
                  bitmap.recycle();
              }
  
              Bitmap bitmap = null;
  
              this.getContentResolver().notifyChange(mImageUri, null);
              ContentResolver cr = this.getContentResolver();
              try
              {
                  bitmap = android.provider.MediaStore.Images.Media.getBitmap(cr, mImageUri);
                  imageView.setImageBitmap(bitmap);
              }
              catch (Exception e)
              {
                  System.out.println("Failed to load");
              }
  
              bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), imageUri);
  
              this.UPLOAD_URL = Config.webSiteUrl + "?action=uploadFile&amp;username=" + this.username + "&amp;password=" + this.password + "&amp;baustelleid=" + Fotos.this.baustelleid;
  
  
              if(bitmap != null) {
                  uploadImage(bitmap, this.UPLOAD_URL);
              }
          } catch (Exception e) {
              System.out.println("Fehler 1");
          }
  
      super.onActivityResult(requestCode, resultCode, data);
  }
  </code></pre>
  
  <p>It ends up with System.out.println("ERROR TAKING PICTURE"); It seems like there is no permission to write the storage. How can I change this?</p>