How to capture camera photo and delete from gallery

1

I'm getting the camera image and saving it in the bank. Catching 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 database, but I do not know how.

    
asked by anonymous 11.01.2017 / 13:58

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 cool when photos can be queried (caching). In this case I advise you to create a .nomedia file so that the 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 to the base, you can delete the file ( link ). Just be careful not to delete before recording

    
11.01.2017 / 14:47