support multi-images and content uri real path resolving#34
support multi-images and content uri real path resolving#34cbjs wants to merge 9 commits intoalinz:masterfrom
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.
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.
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
AndrewHenderson
left a comment
There was a problem hiding this comment.
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.
| data: () => NativeModules.ReactNativeShareExtension.data(), | ||
| close: () => NativeModules.ReactNativeShareExtension.close() | ||
| close: () => NativeModules.ReactNativeShareExtension.close(), | ||
| clear: () => NativeModules.ReactNativeShareExtension.clear() |
There was a problem hiding this comment.
@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