At first please do not mar this question as duplicate. All other questions are old and I've tried solutions from most of them and none of them work.
I'm working on an Android app and I'd added my app to share Android menu. I'd like to add functionality so if user clicks my app on the share list e.g. in Chrome browser or Google Drive app, my app will receive the data from that app e.g. from Chrome it wold be URL.
I've tried to use different plugins and read many posts about how to use intent in my app. Unfortunately none of them work. I've tried:
- Sending url to ionic android app via webintents from another app - this one looked very promising
- https://www.npmjs.com/package/phonegap-webintent
- https://github.com/napolitano/cordova-plugin-intent - this one looked promising as well
- https://github.com/okwei2000/webintent
- https://github.com/stample/cordova-sharingreceptor
Did anyone got this working? My AndroidManifest.xml is as follows - the part about intent:
<intent-filter android:label="@string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
In my config.xml I have:
<preference name="AndroidLaunchMode" value="singleTask" />
And I'm not getting data I'm expecting.
When I'm using https://github.com/napolitano/cordova-plugin-intent plugin I'm getting the intent but clipItems element is missing and the plugin is useless.
What am I doing wrong?
Any help appreciated.