File component problem

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.

Thank you so much!

Android version ?

hello, my device has a version of android 10

And json is created how …?

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.

1 Like

See also here:

1 Like

where is that file coming from?
did you create that directory?

Taifun

Good question.

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?

internal storage

there is a property of the Legacy Mode component, set to true and that solved the problem.

previously it worked without disabling this function, why does it now work this way?

image

I have created this directory with a download extension, the developer deepHost. Still works

Thank you very much for answering

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.

But it does NOT work on Android 11+.

See also here:

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.