Uh oh!
There was an error while loading. Please reload this page.
IntentAndroid.openChooserWithOptions implements - #5476
Conversation
facebook-github-bot
commented
Jan 22, 2016
There was a problem hiding this comment.
no-trailing-spaces: Trailing spaces not allowed.
facebook-github-bot
commented
Jan 22, 2016
@deminoth updated the pull request. |
satya164
commented
Jan 22, 2016
Hey. Thanks a lot for the PR. I've couple of questions and some feedback,
I'll prefer something like,
|
nicklockwood
commented
Jan 22, 2016
The "withOptions" suffix is an Objective-C idiom, and I agree it's not appropriate for the JS api (we should remove it from ActionsSheetIOS).
|
satya164
commented
Jan 22, 2016
|
nicklockwood
commented
Jan 22, 2016
@satya164 they're not exactly singletons, because they can be stacked, but yes I think including more than one as a sibling should probably be an error. |
nicklockwood
commented
Jan 22, 2016
@janicduplessis has a bit of a knack for componentizing these things, perhaps he'd like to have a go at it :-) |
janicduplessis
commented
Jan 22, 2016
For something like Another thing that can be used to componentize singleton APIs is something like I did with |
satya164
commented
Jan 22, 2016
I actually prefer the stacking idea better. We can have multiple components and only have the component at the top of the stack visible. I am not in favor of merging props of different components, because then I can't just look at my component and predict what the state will be, which is a big advantage of React in the first place. |
nicklockwood
commented
Jan 22, 2016
Merging props makes sense for the statusbar, but not for alerts. For example, you wouldn't want the topmost alert to show the message from the one underneath if you only specified a title! |
janicduplessis
commented
Jan 22, 2016
More on topic of this PR, That would require a lot of shuffling around the API :( |
facebook-github-bot
commented
Jan 23, 2016
@deminoth updated the pull request. |
deminoth
commented
Jan 23, 2016
Thank you for all the discussions. Maybe I can make an universal |
janicduplessis
commented
Jan 23, 2016
satya164
commented
Jan 25, 2016
haydenth
commented
Feb 7, 2016
I desperately needed this in a project I am working on, so for the time being I implemented some of your code into a react module that will popup the default android share tray. Will be happy to deprecate when you build ShareModule or something like that. |
mkonicek
commented
Feb 8, 2016
Thanks for releasing it @haydenth! Had a quick look:
Looks like you could use some parts of this PR too. |
satya164
commented
Feb 10, 2016
@deminoth Interested in working on a ShareModule? |
deminoth
commented
Feb 10, 2016
@satya164 I was busy and just started working now. Should I provide an UIExplorer example too? |
satya164
commented
Feb 11, 2016
@deminoth Yeah, will be great. Thanks. |
deminoth
commented
Feb 13, 2016
A new PR for ShareModule #5904 I want to use this PR but got stuck on Git merging... |
mkonicek
commented
Mar 20, 2016
Hey @deminoth! Thanks for making the pull request, but we are closing it due to inactivity (37 days with no activity) to make sure all pull requests are either being worked on or closed. If you want to get your proposed changes merged, please rebase your branch with master and send a new pull request :) |
Summary: revision of #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. Closes#5904 Differential Revision: D3612889 fbshipit-source-id: 0e7aaf34b076a99089cc76bd649e6da067d9a760
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
mikach
commented
Aug 3, 2016
do plan to implement image sharing on Android? |
deminoth
commented
Aug 4, 2016
@mikach I don't have enough time for that now. I can help you if you make PR. |
This implementation of
IntentAndroid.openChooserWithOptionsis similar toActionSheetIOS. showShareActionSheetWithOptions. It callsIntent.createChooser()and you can see how it acts at android docs