Share Photo On Phonegap App
I am trying to send to phonegap app an image from an image gallery using the "share" function.
- To display my app in the "share" list I followed this post
-
I added the following to 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 application is now correctly listed in the "share" list
-
I click on my application
-
I am using cordova-webintent plugin to intercept intent and get EXTRA (my image)
-
I am using this code below to get the 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. } );
-
Success callback is called, but "data" contains " true "
I was expecting to have either url or base64 string of my image
FYI, I also tried window.plugins.webintent.EXTRA_TEXT but I guess this is for link exchange, text only.
Any help would be greatly appreciated
+3
source to share