According to this https://github.com/codenameone/codenameone/issues/411 (April 2015) it is the expected behaviour that the captured image are not deleted via FileSystemStorage.delete() in Android 4.
That's what I get with my 4.4 device (CN1 version 3.4). Is it what will happen on every Android devices ? Is there a workaround to actually delete these captured photo programmaticaly (ie from my app) ?
NB : as reported in the link above it works seamlessly in the simulator.
Thank you,
Cheers
That's an OS limitation. Apps are isolated from system services. It might be possible to do that with the low level camera API's and grab your own photo without going thru the gallery but those aren't currently mapped to Codename One. You might be able to do that with native interfaces.
来源:https://stackoverflow.com/questions/37952473/filesystemstorage-delete-doesnt-delete-captured-files-on-all-android-devices