// deviceready is PhoneGap's init event
document.addEventListener('deviceready', function () {
window.plugins.webintent.getExtra(WebIntent.EXTRA\_TEXT, function (url) {
// url is the value of EXTRA_TEXT
}, function() {
// There was no extra supplied.
});
});