Skip to content

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

Open
cbjs wants to merge 9 commits into
alinz:masterfrom
cbjs:master
Open

support multi-images and content uri real path resolving#34
cbjs wants to merge 9 commits into
alinz:masterfrom
cbjs:master

Conversation

@cbjs

@cbjs cbjs commented Apr 13, 2017

Copy link
Copy Markdown
  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
Copy Markdown
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...

@arribbar arribbar Jul 4, 2017

Copy link
Copy Markdown
Contributor

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

@AndrewHenderson AndrewHenderson left a comment

Copy link
Copy Markdown
Collaborator

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.

Comment thread lib/index.js
data: () => NativeModules.ReactNativeShareExtension.data(),
close: () => NativeModules.ReactNativeShareExtension.close()
close: () => NativeModules.ReactNativeShareExtension.close(),
clear: () => NativeModules.ReactNativeShareExtension.clear()

Copy link
Copy Markdown
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
Copy Markdown
Collaborator

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

@AndrewHenderson

AndrewHenderson commented Nov 9, 2018

Copy link
Copy Markdown
Collaborator

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
Copy Markdown

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