In Android 11 targeting SDK 30, the files created into the shared folder with MediaStore are not retrieved when the app is reinstalled.
Asked
Active
Viewed 552 times
3
-
That is expected behavior. What is your question? – CommonsWare May 11 '21 at 13:44
-
What do you consider to be 'the shared folder'? – blackapps May 11 '21 at 14:24
-
@CommonsWare I don't know if this behaviour should be considered the one expected because the owner of the file should be able to read the file created – Davide Murru May 11 '21 at 14:40
-
@blackapps the shared folder are Documents, Download, Pictures – Davide Murru May 11 '21 at 14:41
-
What do you mean with 'not retrieved'? I think they are still there. – blackapps May 11 '21 at 14:47
-
@blackapps Yes, they are still there, but when I query the MediaStore with contentResolver query they are not retrieved – Davide Murru May 11 '21 at 14:52
-
That is normal on an Android 10 device as you will see only apps own files and some public media files. The owner is very important on Android 11 and at reinstall the app is not the owner anymore. If you want to use them again use saf. – blackapps May 11 '21 at 16:32
-
1"I don't know if this behaviour should be considered the one expected because the owner of the file should be able to read the file created" -- the owner of the file was uninstalled. From Android's standpoint, your fresh app install is not the owner. – CommonsWare May 11 '21 at 16:47