I am trying to use the PhoneGap Share plugin which is supposed to bring up the native Android “Share” window which allows the user to pick which application to share to.
https://github.com/phonegap/phonegap-plugins/tree/master/Android/Share
I have a hyperlink which calls the following code (provided on github).
window.plugins.share.show({
subject: 'I like turtles',
text: 'http://www.mndaily.com'
},
function () {}, // Success function
function () {
alert('Share failed')
} // Failure function);
When trying to debug the app on my phone, I get the following error:
Cannot call method ‘show’ of undefined at file:///android_asset/www/index.html
What do I need to do to get this to work?
I have faced the same problem today. I made it work using the following code instead of the window.plugins thing: