Needed to use this plugin… <plugin name="cc.fovea.cordova.openwith" version="2.0.0">
And it needs to add an <intent-filter>
to the main activity in AndroidManifest.xml, which it does with this block in its plugin.xml (trimmed down a bit):
<config-file target="AndroidManifest.xml" parent="/manifest/application/activity">
<intent-filter>
<data android:mimeType="image/*" />
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</config-file>
But this doesn’t seem to work in VoltBuilder. I can work around it by adding an identical block to my own config.xml, but replacing parent="/manifest/application/activity"
with parent="/manifest/application/activity[@android:name='MainActivity']
Is there a less code-duplicatey way to accomplish this, or is there a way VoltBuilder can support the above (standard-er?) syntax?
(Misc aside: The same applies to local changes to the main activity with <edit-config>
. I’m not sure why.)
Thanks!