O Oliver Simith Member Nov 30, 2024 #1 Hi, everyone, Since I only recently learned that Google has strictly changed the permission policy for reading and writing to external storage starting from a certain api version (Forgive me that my impression of Android internal and external storage is still stuck in a decade or so ago), I started to try to use SaveAs, ContentChooser, FileHandler, etc. introduced by Erel to deal with reading from and writing to files. (SaveAs - Let the user select a target folder + list of other related methods) Now I basically have some concept about creating and reading files using these classes or libraries, but I still don't quite understand how to delete them under api33. Specifically, if my app creates a file in the DOWNLOAD directory, how should I delete it? Thanks.
Hi, everyone, Since I only recently learned that Google has strictly changed the permission policy for reading and writing to external storage starting from a certain api version (Forgive me that my impression of Android internal and external storage is still stuck in a decade or so ago), I started to try to use SaveAs, ContentChooser, FileHandler, etc. introduced by Erel to deal with reading from and writing to files. (SaveAs - Let the user select a target folder + list of other related methods) Now I basically have some concept about creating and reading files using these classes or libraries, but I still don't quite understand how to delete them under api33. Specifically, if my app creates a file in the DOWNLOAD directory, how should I delete it? Thanks.
Solution Erel Dec 1, 2024 You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder.
You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder.
Erel B4X founder Staff member Licensed User Longtime User Dec 1, 2024 #2 You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder. Upvote 0 Solution
You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder.
O Oliver Simith Member Dec 4, 2024 #3 Erel said: You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder. Click to expand... Thanks, Erel, this ExternalStorage has perfectly met my needs. Upvote 0
Erel said: You can delete files with ExternalStorage.DeleteFile. This will however require the user to first select the Downloads folder. Click to expand... Thanks, Erel, this ExternalStorage has perfectly met my needs.