Uh oh!
There was an error while loading. Please reload this page.
Add Share module - #5904
Conversation
facebook-github-bot
commented
Feb 13, 2016
By analyzing the blame information on this pull request, we identified @andreicoman11, @mkonicek and @nicklockwood to be potential reviewers. |
| Text, | ||
| TextInput, | ||
| TouchableHighlight, | ||
| Share, |
There was a problem hiding this comment.
property Share Property not found in Object.create
There was a problem hiding this comment.
You need to add it to the react-native.js.flow file.
facebook-github-bot
commented
Feb 13, 2016
@deminoth updated the pull request. |
bestander
commented
Feb 13, 2016
FYI BUCK build is failing in circle CI. |
facebook-github-bot
commented
Feb 13, 2016
@deminoth updated the pull request. |
facebook-github-bot
commented
Feb 13, 2016
@deminoth updated the pull request. |
facebook-github-bot
commented
Feb 13, 2016
@deminoth updated the pull request. |
deminoth
commented
Feb 13, 2016
@satya164@bestander Thanks :) |
facebook-github-bot
commented
Feb 13, 2016
@deminoth updated the pull request. |
facebook-github-bot
commented
Feb 14, 2016
@deminoth updated the pull request. |
satya164
commented
Feb 16, 2016
ghost
commented
Apr 3, 2016
@ericvicenti would you mind taking a look at this pull request? It's been a while since the last commit was reviewed. |
deminoth
commented
Apr 4, 2016
Now I think it's not a good idea making a new module... Maybe this feature should included in the Linking Module? |
satya164
commented
Apr 4, 2016
Sorry this got neglected. Will review it soon. Why do you think this should be part of linking? |
deminoth
commented
Apr 4, 2016
@satya164 Nevermind. I thought Linking is interact with outer apps but it's just interact with app links. |
| throw new JSApplicationIllegalArgumentException("Invalid contents"); | ||
| } | ||
| mPromise = promise; |
| } | ||
| if (content.hasKey("url")) { | ||
| intent.putExtra(Intent.EXTRA_TEXT, content.getString("url")); // this will overwrite message |
There was a problem hiding this comment.
Let's ignore this prop on Android.
satya164
commented
Jul 22, 2016
Thanks a lot @deminoth . Overall looks good. Just address the few things I mentioned and we can merge, |
satya164
commented
Jul 22, 2016
Also would be nice to update the PR text with the new API. It'll be useful when someone looks at the commit to see how to use this. |
satya164
commented
Jul 25, 2016
@facebook-github-bot shipit |
ghost
commented
Jul 25, 2016
Thanks for importing. If you are an FB employee go to Phabricator to review internal test results. |
andreicoman11
commented
Jul 25, 2016
Thanks @deminoth for sticking with this and seeing it through. |
Summary: revision of react/react-native#5476 It has only one method `shareTextContent` and next will be`shareBinaryContent`. In Android, Promise can't receive a result, because `startActivityForResult` is not working with `Intent.ACTION_SEND`. Maybe we can use `createChooser(Intent target, CharSequence title, IntentSender sender)` which requires API level 22. Closesreact/react-native#5904 Differential Revision: D3612889 fbshipit-source-id: 0e7aaf34b076a99089cc76bd649e6da067d9a760
I still face this issue. |
deminoth
commented
May 15, 2017
@Themarsguy Can I get some more info? |
IjzerenHein
commented
Dec 18, 2017
Hi, just curious, was there a reason why specifying an URL/image was not implemented on Android? Were there any hurdles with this? |
deminoth
commented
Dec 19, 2017
@IjzerenHein As I remember, the app chooser didn't support |
IjzerenHein
commented
Dec 19, 2017
Alright, thanks for the feedback @deminoth 👍 |
deminoth
commented
Dec 19, 2017
@IjzerenHein Read documents and see https://github.com/facebook/react-native/tree/master/RNTester (was UIExplorer when I wrote this module) |
IjzerenHein
commented
Dec 19, 2017
Alright, thanks for the tip @deminoth ! |
Share
Open a dialog to share text content.
In iOS, Returns a Promise which will be invoked an object containing
action,activityType.If the user dismissed the dialog, the Promise will still be resolved with action being
Share.dismissedActionand all the other keys being undefined.
In Android, Returns a Promise which always be resolved with action being
Share.sharedAction.Content
message- a message to sharetitle- title of the messageiOS
url- an URL to shareAt least one of URL and message is required.
Options
iOS
excludedActivityTypestintColorAndroid
dialogTitle