-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
How to share image/file to another app(using Share.share)? #17682
Comments
I'm experiencing the same behaviour when sharing using whatsapp. When sharing with email the file is attached but with no extension. |
@matiasbontempo: what did you end up using? I keep finding your comments in multiple places with the same errors that I'm experiencing. 😄 |
Hey @lucasbento! Sadly, I have no updates. I might try to take a look at the code and try to solve it myself but I have no experience with iOS native code. If I have any kind of success I'll create a PR and let you know! |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
For anyone that's having a problem with this, I used file sharing with react-native-fetch-blob and react-native with PR react-native-share/react-native-share#215. |
@lucasbento Did you have a problem installing react-native-share? After installing my app crashes |
@sturmenta: your link is giving |
@lucasbento Sorry, delete the stackoverflow post because I did not have any kind of way to show the error I doubted they could help me, finally I had problems in the AndroidManifest.xml with the provider. This is the link to how I solved the problem published as an issue in react-native-share: react-native-share/react-native-share#227. Thanks also for your help. Regards! |
Is this a bug report?
maybe
Have you read the Contributing Guidelines?
yes
Environment
Environment:
OS: macOS High Sierra 10.13.2
Node: 9.3.0
Yarn: 1.3.2
npm: 5.6.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.52.0
Target Platform: iOS (10.3),Android(7.1.1)
Steps to Reproduce
1.create base64 string or local filename
2.use Share.share option
3.
` const content = {
message: ICON_PLUS_BASE64,
//or: message: 'file:///data/0/tmp/..........',
title: 'share',
url: ICON_PLUS_BASE64,
};
const option = { dialogTitle: 'title title title' };
Share.share(content, option);
const ICON_PLUS_BASE64 = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADMAAAAzCAYAAAA6oTAqAAAAEXRFWHRTb2Z0d2FyZQBwbmdjcnVzaEB1SfMAAABQSURBVGje7dSxCQBACARB+2/ab8BEeQNhFi6WSYzYLYudDQYGBgYGBgYGBgYGBgYGBgZmcvDqYGBgmhivGQYGBgYGBgYGBgYGBgYGBgbmQw+P/eMrC5UTVAAAAABJRU5ErkJggg==';
`
Expected Behavior
(Write what you thought would happen.)
App will share(maybe export is more accurate) the image to another app(eg,iMessage,evernote,wechat,etc)
Actual Behavior
The destination app only receive string message but not image.
Reproducible Demo
https://snack.expo.io/@monkingame/test-share
The text was updated successfully, but these errors were encountered: