I am not sure but try it. It might be help you.
onActivityResult i am taking the Image and then going to store it in to the another bitmap.
See this:
if(resultCode == RESULT_OK && requestCode==TAKE_PHOTO_CODE){
final File file = getTempFile(this);
try {
tempBitmap = Media.getBitmap(getContentResolver(), Uri.fromFile(file));
photoBitmap = Bitmap.createScaledBitmap(tempBitmap, display.getWidth(), display.getHeight(), true);
takePhotoFromCamera = true;
// do whatever you want with the bitmap (Resize, Rename, Add To Gallery, etc)
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
}
}
Now, here you can delete the the file after taking it to the bitmap. So it might be not saved to the sdcard.
Try it. Hope it will help you.
or . . .
Use this:
code to get Last picture taken by user:
String[] projection = new String[]
{MediaStore.Images.ImageColumns._ID, MediaStore.Images.ImageColumns.DATA,
MediaStore.Images.ImageColumns.BUCKET_DISPLAY_NAME,
DATE_TAKEN, MediaStore.Images.ImageColumns.MIME_TYPE};
final Cursor cursor = managedQuery(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
projection, null, null, DATE_TAKEN + " DESC");
After getting that image, delete it. So it will help you.
Enjoy. :))