Android Question Working with files in Android 11+

Dane du Plooy

Member
Licensed User
As part of our app, we save log files (.txt) to the device, which the user later retrieves with the File Manager ("My Files"). We are using RuntimePermissions.GetSafeDirDefaultExternal(""). Since Android 11, the location which this references (under Android/data) is no longer accessible to the File Manager. I have been trying a number of things, but it seems like anything to do with accessing / writing to folders is convoluted with regards to permissions, so I thought it may be better to just ask:
What is the best way to write a file from our app to the device, in a way in which the file is readily accessible to the user from the File Manager ("My Files")?
Or is this now "impossible", and we have to list the files inside our app with a "Share" option or something like that?
Thanks!
 

agraham

Expert
Licensed User
Longtime User
the File Manager ("My Files").
Which File Manager? There are several for the device on the Play Store that can read Android/Data. CX File Explorer, X-Plore and Total Commander for a start.

A PC connected by USB can also read Android/Data using the Windows File Manager
 
Upvote 0

Dane du Plooy

Member
Licensed User
Just the default Android file explorer. Will try the ones you have suggested, thank-you; still seems a bit "hacky", but if that's the only solution then we'll take it ?.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…