Reputation: 3294
We have an existing Cordova iOS App for which we need an iOS share extension which will allow Users to to share files from other apps (like Photos, Pages, Numbers, Keynote, etc) with our App (i.e. Export file from Pages to our App).
We need the following delivered:
Upvotes: 5
Views: 5101
Reputation: 401
There are few links which could be helpful even if you do not want to use open with plugin
https://irace.me/tumblr-ios-extension
http://engineering.curalate.com/2017/03/09/ios-share-ext-with-ionic.html
In android editing, the manifest worked fine for me. I had to add one more java file added in some already added plugin like below in plugin.xml. Which in turn added in the manifest.
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="image/*" />
<data android:mimeType="application/pdf"/>
<data android:mimeType="application/msword"/>
<data android:mimeType="application/mspowerpoint"/>
<data android:mimeType="application/powerpoint"/>
<data android:mimeType="application/vnd.ms-powerpoint"/>
<data android:mimeType="application/x-mspowerpoint"/>
<data android:mimeType="application/excel"/>
<data android:mimeType="application/vnd.ms-excel"/>
<data android:mimeType="application/x-excel"/>
<data android:mimeType="application/x-msexcel"/>
<data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document"/>
<data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"/>
<data android:mimeType="application/vnd.openxmlformats-officedocument.presentationml.presentation"/>
</intent-filter>
</activity>
Upvotes: 0
Reputation: 1328
That's a good and still relevant question.
I tried to make use of the awesome cordova-plugin-openwith by Jean-Christophe Hoelt but faced several issues. The plugin is meant to receive share items of one type (say, URL, text or image), which is configured during installation. Also, with its current implementation, writing a note to share and selecting a receiver in a Cordova app are two different steps in different (native and Cordova) context, so it didn't look as a good user experience to me.
I made these and other corrections to this plugin and published it as a separate plugin: https://github.com/EternallLight/cordova-plugin-openwith-ios
Note that it works only for iOS, not for Android.
Upvotes: 1
Reputation: 307
There is a cross-platform cordova plugin (iOS and Android) that achieves that: https://github.com/j3k0/cordova-plugin-openwith
Upvotes: 3