FileKit
FileKit copied to clipboard
File operation on Android
Hi, thanks for the great library.
I've countered this issue on Android while allow user to delete/ overwrite a file from public external storage (music, video), it would throw SecurityException. Maybe we could have some funnction that allow a system-popup to show up and gain user acceptance then proceed the operation? I've figured out that this require the use of ContentResolver.delete/openOutputStream()
Many thanks!
Hi @dhng22! Thanks for creating this issue!
At first, I would suggest using an external library that will help you to request the permissions you need like:
- Moko Permissions https://github.com/icerockdev/moko-permissions
- Calf Permissions https://mohamedrejeb.github.io/Calf/permissions/
You will be able to request the permissions before trying to access / modify the file.
Does it solve your problem?
@vinceglb Hi, sorry for the long reply, but unfortunately, the two libraries you suggested is not meant to access (modify/delete) content in scope storage, as I've mentioned earlier, it can only be achieved by ContentResolver.delete/openOutputStream()