Skip to content
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

support multi-images and content uri real path resolving #34

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

cbjs
Copy link

@cbjs cbjs commented Apr 13, 2017

  1. add support for SEND_MULTIPLE

  2. add clear() ReactMethod

  3. support content:// uri. like content://com.android.chrome.FileProvider/images/screenshot/1491884783726318722338.jpg

type = "";
}
images.pushString("file://" + RealPathUtil.getRealPathFromURI(currentActivity, uri));
} else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type.startsWith("image")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are images the only things that can be "mutiple"? Is it not possible to send more than one thing of anther type?

Perhaps the shape of the object we return to RN is wrong. Maybe it should be an array of {type, value}? This way you could use it to share multiple contacts, image etc...

Copy link
Contributor

@arribbar arribbar Jul 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you @npomfret. I think it would be better to return an array of {type, value}.
Also, it would be nice to be able to share other types as audio, video, etc.
I'll try to make a PR asap

Copy link
Collaborator

@AndrewHenderson AndrewHenderson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

support content:// uri. like content://com.android.chrome.FileProvider/images/screenshot/1491884783726318722338.jpg

Does this mean support for images hosted on the Web in the Photos app?

Please address comment, regarding data type (i.e. Array vs Object), as well as the ability to share multiple of the other supported types. Then please resolve any conflicts.

Merging this will depend on the status of the iOS solution: #32. I don't think we should merge until both platforms have multiple capability.

@@ -5,5 +5,6 @@ import { NativeModules } from 'react-native'
// NativeModules.ShareExtension.close()
export default {
data: () => NativeModules.ReactNativeShareExtension.data(),
close: () => NativeModules.ReactNativeShareExtension.close()
close: () => NativeModules.ReactNativeShareExtension.close(),
clear: () => NativeModules.ReactNativeShareExtension.clear()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbjs Can you explain the need for the addition of clear?

@AndrewHenderson
Copy link
Collaborator

@cbjs Please coordinate with @markdaws to match behavior on iOS. Thanks!

@AndrewHenderson
Copy link
Collaborator

AndrewHenderson commented Nov 9, 2018

Please take a look at #84 as well. Since that PR supports both platforms, it’s more likely we’ll merge that one.

You’ve got a good understanding of the issue, so a review and collaboration on that PR would be greatly appreciated.

@yaseralimardany
Copy link

Why the owner didn't merge this merge request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants