Skip to content

Instantly share code, notes, and snippets.

@elidupuis
Created May 13, 2014 03:23
Show Gist options
  • Select an option

  • Save elidupuis/f966e5cec7b6443f88d2 to your computer and use it in GitHub Desktop.

Select an option

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