steve.b 0 Posted Thursday at 02:16 PM In my Android app, the user should have the possibility to save app configuration in a USB stick (and then restore that configuration if necessary). I managed to open the app Files and select the root of the USB stick connected to the device. I get the corresponding URI: "content://com.android.externalstorage.documents/tree/A8AC-5853%3A". Now I have to create a subfolder and write in it two (xml) files but I don't know how to do. I have found some Java code and some information in the Android Developers site but I'm not able to translate those information into some working delphi code. Someone can give me some help? Share this post Link to post
Dave Nottage 605 Posted Thursday at 07:47 PM 5 hours ago, steve.b said: I have found some Java code and some information in the Android Developers site but I'm not able to translate those information into some working delphi code. Can you provide links to the code and information you're referring to? Share this post Link to post
steve.b 0 Posted Friday at 06:19 AM @Dave Nottage Here are some of the links I found: https://medium.com/@vivekvashistha/how-to-save-a-file-in-shared-storage-location-in-android-13-c1e4fdf3d2cb https://stackoverflow.com/questions/57570369/android-saf-uri-of-a-folder-on-disk-from-documentscontract-gettreedocumentid https://github.com/emozgun/delphi-android-SAF/tree/main https://stackoverflow.com/questions/68636036/how-to-create-a-subfolder-of-a-uri-folder-android-10 https://developer.android.com/training/data-storage/shared/documents-files?hl=it Share this post Link to post
Dave Nottage 605 Posted Friday at 08:25 AM 2 hours ago, steve.b said: Here are some of the links I found: Given the content of the links, to create Delphi code for what you want to do does not seem trivial. Share this post Link to post
steve.b 0 Posted Friday at 08:56 AM It's certainly not a trivial thing for me. I'm not familiar with Delphi and even less with Android. But it seems absurd to me that it's so complicated to create a folder on a USB stick and copy files into it in Android, in Windows it's definitely trivial. I'm certainly not the only one who tried to do this, someone must have done it in Delphi (with less than 100 lines of code, I hope...). I continue to search but unfortunately I have not yet found any concrete information. My knowledge of Delphi and Android is limited and this does not make things easier. Share this post Link to post