How to capture camera photo and delete from gallery

Asked

Viewed 616 times

2

I’m getting the image of the camera and saving it in the bank. To get the image is very widespread code, there is nothing new. However the image is also in the gallery, and I would like to delete it, since I already have it saved in the Sqlite bank, but do not know how.

1 answer

0

I see two alternatives:

1) you create a unique directory for your application and store all the photos, keeping the history on the device - this is nice when the photos can be consulted (storage on cache). In this case I advise you to create a file .nomedia so that images no longer appear in the gallery and make it difficult for the user to delete them.

2) If you prefer to delete after recording at the base, you can delete the file (https://stackoverflow.com/questions/5486529/delete-file-from-internal-storage). Just be careful not to delete before recording

  • Hello Linhares good afternoon, my thanks ai for the interaction, about deleting before not, I do the common procedure ie capture and game in imageView with redefined dimensions of it that I play in Sqlite, well I’ll see your suggestion, Thanks.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.