title: saving photos taken to a specific folder
body: <p>I would like some help with saving pictures taken from my camera to a specific folder on the SD card.  My camera opens up, takes the photos, and saves them; but it saves them to the standard folder.  The code I have so for is:</p>
  
  <pre><code>public class Camera extends Activity {
  public static final int MEDIA_TYPE_IMAGE = 1;
  public static final int MEDIA_TYPE_VIDEO = 2;
  private static final int CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE = 100;
  String Path;
  private Uri fileUri;
  
  @Override
  public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      Bundle extras=getIntent().getExtras();
      Path= extras.getString("Path");
      Log.d("camear","path: "+Path);
      //File mediaStorageDir = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "MyCameraApp");
  
      Intent intent = new Intent(MediaStore.INTENT_ACTION_STILL_IMAGE_CAMERA);
          this.startActivity(intent);
      String timeStamp = new SimpleDateFormat("yyyyMMdd_HHmmss").format(new Date());
      //mediaFile = new File(mediaStorageDir.getPath() + File.separator +"IMG_"+ timeStamp + ".jpg");
  
      //fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);
      Uri outputFileUri= Uri.fromFile(new File(Path+"/camera/"+timeStamp+".jpg"));// create a file to save the image
      intent.putExtra("output", outputFileUri); // set the image file name
  
      // start the image capture Intent
      startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
  </code></pre>
  
  <p>The path is coming from another activity on the application, and it passes its values fine.  In the previous activity, it creates the folders that I want to save the pictures into.</p>
  
  <p>I have looked at the following answer, and tried to implement some of the suggestions: <a href="https://stackoverflow.com/questions/7266572/how-to-save-images-from-camera-in-android-to-specific-folder">How to save images from Camera in Android to specific folder?</a>.  One thing I didnt try, was in the last suggestion on the OnActivityResult.  Is that the key or is there somthing else I am missing?  This page here mentions the ContentResolver <a href="https://stackoverflow.com/questions/8524164/the-camera-intent-is-simply-not-working">The Camera Intent is simply not working</a>, one thing is that both pages look like they want to do the same, but go about it in different ways.</p>