Android does not allow apps to write just anywhere as a matter of safety. That’s probably generally a useful feature, but this time I wanted to save data to a text file that is accessible to the user (me). The official guide wasn’t really helpful in this case, because there are ways to save data on Android that are not accessible by the users — e.g. for settings.
Apparently the ‘easiest’ way is to save like this:
set the defaultFolder to specialFolderPath("external documents")
put field "write" into URL ("file:test.txt")
The other (common) special folders (“documents”, “desktop”, “engine”) don’t seem to work on Android.
OK, but where is this file we created? Here:
Not the most intuitive place to me, but whatever, I can access this file from the Android device.