Hello good dear programmers, I would like you to help me with the failure of the file component, thank you very much in advance!
I am trying to read a JSON file with the Read From method but this gives a negative answer, I thought that the file was not there or that I had misspelled the path so I looked in this community for an extension that would check the existence of a TaifunFile file and use the method Exists instead this if it gives a positive answer, check that there is a problem with the component. someone knows of any solution, extension that can help.
No, there is no solution (without requesting MANAGE_EXTERNAL_STORAGE permission, which will not be granted by Google).
The File component basically redirects all paths to the ASD on Android 10+ devices. On Android 11+, any folder can no longer be created in the external storage and the access to manually created dirs (outside of Shared folders) is denied.
Since targetSdkVersion=30 there is no way to create such a dir on Android 11+.
So the question should be: Did you create that dir manually or before targetSdkVersion=30?
It works on Android 10, because Kodular has decided to continue to declare android:requestLegacyExternalStorage="true" in the Manifest (therefore it still works under Android 10). The same with AI2.