I am trying to send to my phonegap application an image from the image gallery, using the 'share' feature.
- To display my app in the 'share' list, I have followed this post
I have added the following in my AndroidManifest.xml
<intent-filter> <action android:name="android.intent.action.SEND" /> <category android:name="android.intent.category.DEFAULT" /> <data android:mimeType="image/*" /> </intent-filter>
My app is now properly listed in the 'share' list
I click on my app
I am using cordova-webintent plugin to intercept the intent and get EXTRA( my image )
I am using this code below to get my image
window.plugins.webintent.getExtra(window.plugins.webintent.EXTRA_STREAM, function(data) { console.log(data) }, function(e) { console.log(e) // There was no extra supplied. } );
The success callback is called, but 'data' contains 'true'
I was expecting to have either an url, or a base64 string of my image
FYI, i have also tried window.plugins.webintent.EXTRA_TEXT but i guess this is only for sharing link, text.
Any help would be greatly appreciated