jkorrek commented on issue #679:
URL: 
https://github.com/apache/cordova-plugin-camera/issues/679#issuecomment-924763509


   From what I can tell, taking a picture with this plugin might always add the 
picture to the phones gallery (=MediaStore), even if `saveToPhotoAlbum` is 
`false`. I think that this is related to camera app that used on the phone, but 
I am not completely sure about that.
   
   The deletion of files in the MediaStore changed with the Scoped Storage 
changes introduced in SDK 29.
   As far as I can tell, deletion will only be possible if the user manually 
approves the modification.
   
   In SDK 29 this permission may be requested via the 
RecoverableSecurityException. Starting from SDK 30, a delete request can be 
created.
   
   You can find a simple implementation for this here: 
https://github.com/jkorrek/cordova-plugin-camera/blob/sdk-30-deletion/src/android/CameraLauncher.java#L1267
   
   As I am not sure if I want to bother our users with this deletion request, I 
also added a flag to explicitly activate this behaviour. 
   
   For Android 10 / SDK 29 the confirmation request show to the user will look 
like this:
   
![deletion_confirmation](https://user-images.githubusercontent.com/7962396/134319587-33c6350c-44a1-442c-92dd-e8eb630ad464.png)
   
   I wasn't able to test this for Android 11 / SDK 30 yet.
   
   
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to