I'm not sure, but I will try. It can help you.
onActivityResult I am taking an image and then going to save it to 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;
Now you can delete the file after its bitmap. Therefore, it may not be saved on the SD card.
Give it a try. Hope this helps you.
or.,
Use this:
code to get the last image made by the 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 receiving this image, delete it. This will help you.
Enjoy. :))
source share