[Android] Sharing data uri silently fails without WRITE_EXTERNAL_STORAGE
See original GitHub issueTried with RN 0.44, Android M & N.
I cannot get the url
option to work to share an image. I’m using a data URI of an image. I’ve also tried the sample code in this repo.
- If I do
Share.open
and pick:- Gmail
url
is ignored. (subject
andmessage
work) - “Upload to Photos” I get a toast saying “Error, could not load media”
- “Save to Drive” I get a toast saying “Upload was unsuccessful, request contained no data”
- Gmail
It seems like the url is dropped on the way. I’m going to see if I can step through the code in Android Studio to make sure the URL gets all the way to the intent.
(FWIW, this works great in iOS)
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top Results From Across the Web
[Android] Sharing data uri silently fails without ... - GitHub
Tried with RN 0.44, Android M & N. I cannot get the url option to work to share an image. I'm using a...
Read more >android - Share image without WRITE_EXTERNAL_STORAGE?
The share works fine when the uri points to a file in getExternalFilesDir() , but I'd prefer a solution that does not require...
Read more >Manifest.permission - Android Developers
Old permission for deleting an app's cache files, no longer used, but signals for us to quietly ignore calls instead of throwing an...
Read more >Data and file storage overview - Android Developers
Shared storage: Store files that your app intends to share with other apps, including media, documents, and other files. Preferences: Store private ...
Read more >Storage updates in Android 11 - Android Developers
If your app targets Android 11, both the WRITE_EXTERNAL_STORAGE permission and the WRITE_MEDIA_STORAGE privileged permission no longer provide any additional ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for sharing, tough I solved this by setting permissiosAndroid and writing the file I wanted on a external directory since its the only accepted path on all android apps.
How to write the file on an external directory? I am using react-native-fetch-blob to write the file,
and share the pdf as
Gmail still ingnore the url, can anyone help this?