-
Notifications
You must be signed in to change notification settings - Fork 986
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAF Support #926
Comments
I have also confirmed that even without using a directory picker, the following paths do not work after targeting past API 29:
When I try to run either of these interactions with the following code:
Which worked on the same emulated Android R device when built using API 28 I get the following error:
However, interestingly, the following DOES work:
|
@crutchcorn So does it only work on, |
@tolgaerdonmez yes, that's correct. You can create sub-folders that way. Honestly, SAF is a pretty big can of worms that requires a dedicated API. I might start a separate package just for SAF support |
@crutchcorn so were you able to read files from the download directory? Because as far as I know we can't read the files from download directory. |
It seems to work for me. This is the code I'm using to do the write: |
Does the project have any ability to support SAF read/writes? I've tried using a SAF Directory Picker I wrote:
https://github.com/oceanbit-dev/react-native-directory-picker/blob/master/android/src/main/java/com/rndirectorypicker/DirectoryPickerModule.java
But whenever utilizing the
writeFile
orreadFile
, I seem to always get errors since the paths cannot be converted from SAF to/typical/paths/like/this
. SAF is required as-of Android R, and once React Native apps hit API 30 support, apps that aren't using SAF will likely break (such as mine).Here's the relevant code to outline what I'm doing:
Then, when I run
writeToFileSAF
, I get an error similar to the following:Are there known bugs regarding SAF? What's the future of this package look like?
The text was updated successfully, but these errors were encountered: