cordova-plugin-openwith icon indicating copy to clipboard operation
cordova-plugin-openwith copied to clipboard

Not able to get multiple images

Open iamtarun1993 opened this issue 6 years ago • 7 comments

In src/ios/ShareExtension/ShareExtension-Info.plist file I updated NSExtensionActivationSupportsImageWithMaxCount from 1 to 10. Now I'm able to select 10 images from Gallery/external app, but in ionic app inside handler intent.items.length is always 1. i.e I'm always getting only first image that I selected in gallery.

Need help.

iamtarun1993 avatar Oct 03 '19 13:10 iamtarun1993

Im' also facing the same issue @j3k0 please fix this issue as soon as possible, Thanks in advance

jmhrrrptvj avatar Oct 08 '19 09:10 jmhrrrptvj

Also facing this same issue. Anyone already found a solution? Thanks.

oudj001 avatar Oct 15 '19 07:10 oudj001

Looks like this line is responsible for getting only the first item: https://github.com/j3k0/cordova-plugin-openwith/blob/262c1676d443239bf408dc89f2598d5c15a9488a/src/ios/ShareExtension/ShareViewController.m#L126

If multiple items should supported this should be changed to iterate over all items.

NiklasMerz avatar Jan 09 '20 07:01 NiklasMerz

For Android I found those two lines that look promising. But I did not try to change that, yet

https://github.com/j3k0/cordova-plugin-openwith/blob/262c1676d443239bf408dc89f2598d5c15a9488a/plugin.xml#L103 https://github.com/j3k0/cordova-plugin-openwith/blob/262c1676d443239bf408dc89f2598d5c15a9488a/src/android/cc/fovea/openwith/OpenWithPlugin.java#L186

NiklasMerz avatar Jan 09 '20 07:01 NiklasMerz

i've found when i pick multiple files from file manager on android, my share target app with this plugin is missing

but single file work? why

crapthings avatar Feb 02 '20 14:02 crapthings

Like my previous comment said: Sharing is only enabled for single files. You could try to change those lines and see that is necessary to enable that. Pull requests are welcome.

I might need that feature some time as well, but I currently don't have the time to implement and test it.

NiklasMerz avatar Feb 08 '20 09:02 NiklasMerz

Using android.intent.action.SEND_MULTIPLE actually works for me

vlafranca avatar Nov 06 '20 03:11 vlafranca