-
Notifications
You must be signed in to change notification settings - Fork 134
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
[Android] Copy file to Download directory in android < 10 #170
Comments
Hello, Exactly, the MediaCollection API is copying the file to the shared download folder for Android 10 and above. (See https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/iPhoneOSKeys.html#//apple_ref/doc/uid/TP40009252-SW20:~:text=3.2%20and%20later.-,UIFileSharingEnabled,-UIFileSharingEnabled%20(Boolean for more information) |
Hello, Thanks for answering. Is there any solution for android to work in a version lower than 10? Is It possible to implement such functionality? Using another API that can give access to the external storage when in a lower version or something like that? |
It's possible yes. |
I'm reopening for now. Would be great if you're able to test it for your purpose. It's so far untested but I'll test it myself this or next week. |
Hello, I have tested it here and it's working fine. It would be cool if when the docs for these new changes are made, the need for runtime permissions is mentioned alongside it. |
Thanks. But I sadly run into issues myself during testing, realizing that we will get warnings / errors if we try to build it with targetSDK > 29. But you could try using the downloadmanager option. This one should still work |
Found a way around. Update will be released tomorrow |
https://github.com/RonRadtke/react-native-blob-util/releases/tag/0.16.2 You can use the Mediastore API now also on old devices to store the file in the public downloads folder. |
Hello,
Before anything, thank you very much for maintaining this library, I really appreciate your work.
At the moment, as far as I understand, the
MediaCollection.copyToMediaStore
method only truly copies the file to the shared Download directory if the android version is 10 or higher.Am I wrong about that? Or is there a way to make that happen?
If not, do you have an idea of when this will be possible? Although I don't have much experience with native code, I am willing to help with anything necessary.
Thanks.
The text was updated successfully, but these errors were encountered: