i am creating an app where the user has to posibilty to export certain data to a file (xml) which the user can then use where ever they want.
Now everything worked perfecly fine. the XML content of the file is created, permission asked and even the file is written to de download folder perfecly.
Perfectly in API 28 (Pie) that is. When i started testing in API 33 it all fell apart.
Of course the xml content is still created but the permission..... not to say anything about the actual file writting.
So, web search it was:
developer.android.com
very nich blog by Jerry Hildenbrand
and lots more like this.
The problem is they do not completly answer my questions:
- the blog of Jerry states "Scoped Storage gives the ability to create a second folder for files the app creates" can this second folder be accessed by the native file browser? it seems not because later in the text is says my app needs to give permission for that. What is the use of exporting something if you cannot find it then outside of the app?
- If you could access the folder in a file browser than how do i get this foldername in my app (kotlin code)?
- Is this "second folder" thing backward compatible? (my app targets 24..33)
- if this is not the correct way then what is? because even google (first link) say "has no effect" but they do not point to an alternative.
in short: i am running in circles and am in need of some pointers out of this groundhog day.