j3k0 / cordova-plugin-openwith

Get your Cordova App in the O.S. "Share" menu on iOS and Android
MIT License
137 stars 114 forks source link

Not able to get multiple images #76

Open iamtarun1993 opened 5 years ago

iamtarun1993 commented 5 years ago

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.

jmhrrrptvj commented 5 years ago

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

oudj001 commented 5 years ago

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

NiklasMerz commented 4 years ago

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 commented 4 years ago

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

crapthings commented 4 years ago

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

NiklasMerz commented 4 years ago

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.

vlafranca commented 3 years ago

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