Im trying to save the image taken by teh Camera intent. My code wasnt working so when i added the check whether the directory is even made, it should that it wasnt.What can possibly be wrong?
Im trying on the emulator. 

```
01-11 13:50:28.946: D/file(1161):  file is /mnt/sdcard/M3
01-11 13:50:28.946: D/file(1161):  photo is /mnt/sdcard/M3/3_1.jpg

```

I get the above in the log. 

Below is the code i have on the button which opens camera 

```
File sdCard = Environment.getExternalStorageDirectory();
            File file = new File (sdCard.getAbsolutePath() , File.separator + "/M3");
            file.mkdirs();
            String name = e_id + "_" + (size+1)+ ".jpg";
            File newfile = new File(file,name);
            newfile.mkdir();

                Log.d("file"," file is " + file.toString());
                Log.d("file"," photo is " + newfile.toString());

            if(!file.mkdir())
            {
                Log.d("file"," not created ");
                }
            if(!newfile.mkdir())
            {
                Log.d("newfile"," not created ");
                }
            else
            {
                outputFileUri = Uri.fromFile(newfile);
                Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
                intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
                startActivityForResult(intent, TAKE_PICTURE);

            }

```