title: Capture a Photo without saving
body: <p>I'm trying to take a photo with this code:</p>
  
  <pre><code>capturarFoto.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Log.d("debugging","Has clicat al botó");
              Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
              startActivityForResult(cameraIntent, 1888);
          }           
      });
  
  @Override
  public void onActivityResult(int requestCode, int resultCode, Intent data) {
      if( requestCode == 1888 &amp;&amp; resultCode == -1) { //-1 = TOT HA ANAT BE.
          Bitmap photo = (Bitmap) data.getExtras().get("data");
          Log.d("debugging",""+photo.getHeight());
          Log.d("debugging",""+photo.getWidth());
          ((ImageView) myFragmentView.findViewById(R.id.fotoCapturada)).setImageBitmap(photo);
      }
  }
  </code></pre>
  
  <p>And this is working perfectly, as I capture the photo, it's shown in the ImageView. But I'm trying to create some sort of editable options, rotation, etc. So I don't want to save it (so gallery already cached it!!). </p>
  
  <p>I've read some similar questions, and this is something that would be great to do:</p>
  
  <ul>
  <li>Create a folder on SDCARD</li>
  <li>Save temporary picture there</li>
  <li>Create a .nomedia file so gallery don't access it.</li>
  <li>Remove or save applies on the picture, and leave it on that folder.</li>
  </ul>
  
  <p>I'm trying to update above code, to adapt it to achieve these points, but the code I find in google, always use other apis, some of them, old...</p>
  
  <p>Is there any "easy" way to achieve this?</p>
  
  <p>The part of creating folder and creating that file, isn't a big deal, so:</p>
  
  <p><strong>- How can I set a saving route to the pictures I take with my App?</strong></p>
  
  <p>Thank you.</p>
  
  <p>Edit:</p>
  
  <p>Okay, I found some code, but It isn't working (even I gave SD writing permissions):</p>
  
  <pre><code>Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
              File file = new File(Environment.getExternalStorageDirectory().getPath() + "/folder/" + "filename" + ".jpg");
              Uri imageUri = Uri.fromFile(file);
              cameraIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageUri);
  
              startActivityForResult(cameraIntent, 1888);
  </code></pre>