Native App: Android Delete Camera Captured Image Through My App
In my android app i have used camera intent for capture photo. Once photo taken, on Activity result i got image bitmap data. I stored the image data in my local db(sqlite db) for f
Solution 1:
- Retrieve absolute path to the image file and create
File
object - Ensure you have write access to it
- Call
File.delete()
Check for exception and return values
Solution 2:
If you used EXTRA_OUTPUT
on your ACTION_IMAGE_CAPTURE
Intent
, you (usually) have control over where the image is written, and you can delete it yourself.
If you did not use EXTRA_OUTPUT
, then the camera app should not be saving a full image anywhere. If it is doing that, it's a bug in that app. However, you do not have any idea where that image lives, and therefore there is nothing that you can do about it.
Post a Comment for "Native App: Android Delete Camera Captured Image Through My App"