Hi!
I answer myself:
maybe is not the best solution but after deleting the file, this is
what I do:
sendBroadcast(new Intent(Intent.ACTION_MEDIA_MOUNTED,
Uri.parse("file://" + Environment.getExternalStorageDirectory())));
we need to add this to the manifest:
<intent-filter>
<action android:name="android.intent.action.MEDIA_MOUNTED" />
<data android:scheme="file" />
</intent-filter>
(I found the solution here:
http://stackoverflow.com/questions/4430888/android-file-delete-leaves-empty-placeholder-in-gallery)
On Apr 21, 11:32 am, Fina Perez <[email protected]> wrote:
> Hi all!
>
> I'm using the built-in camera in my app to take a picture and to save
> it in a database. So, from my activity, I launch the camera, take a
> picture and go back to the activity (thanks to "onActivityResult"
> method). Here, I store the picture in the database and I delete it
> from the phone. Seems to be working properly: the picture is being
> deleted from the sdcard but if you go to the gallery app that comes
> with the device, the picture is being displayed but as a "wrong file",
> so you can see that there is/was a picture there but you can't open it
> or even see the preview. But I can delete it from the gallery app
> manually (selecting them and then deleting). How can i do this
> programatically?
>
> Thanks a lot! I really need help with this
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en