-
Notifications
You must be signed in to change notification settings - Fork 402
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
base: master
Are you sure you want to change the base?
Conversation
type = ""; | ||
} | ||
images.pushString("file://" + RealPathUtil.getRealPathFromURI(currentActivity, uri)); | ||
} else if (Intent.ACTION_SEND_MULTIPLE.equals(action) && type.startsWith("image")) { |
There was a problem hiding this comment.
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...
There was a problem hiding this comment.
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
There was a problem hiding this 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() |
There was a problem hiding this comment.
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
?
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. |
Why the owner didn't merge this merge request? |
add support for SEND_MULTIPLE
add clear() ReactMethod
support content:// uri. like content://com.android.chrome.FileProvider/images/screenshot/1491884783726318722338.jpg