I am trying to open a webpage with cordova using this code:
window.plugins.webintent.startActivity({action: WebIntent.ACTION_VIEW,url: 'geo:0,0?q=' + address},
function() {},
function() {alert('Failed to open URL via Android Intent')}
)
But I keep getting this error:
ReferenceError: WebIntent is not defined
Any thoughts?
If you are using
Cordova 2.0
make sure you have the following entry inconfig.xml
:also the
WebIntent.java
file needs to be stored in:Finally make sure you include webintent.js after the cordova.js: