Skip to content

Instantly share code, notes, and snippets.

@elidupuis
Created May 13, 2014 03:23
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save elidupuis/f966e5cec7b6443f88d2 to your computer and use it in GitHub Desktop.
Simple Cordova WebIntent test function
// https://github.com/InQBarna/WebIntent
function testIntent () {
console.log('testIntent...');
if (window.device) {
console.log('DEVICE mode; testing web intent: startActivity');
var address = 'edmonton alberta';
CDV.WEBINTENT.startActivity({
action: CDV.WEBINTENT.ACTION_VIEW,
// url: 'geo:0,0?q=' + address
url: 'http://fzs.sve-mo.ba/sites/default/files/dokumenti-vijesti/sample.pdf'
},
function() {},
function() {
console.log('Failed to open URL via Android Intent')
}
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment