Simple Cordova WebIntent test function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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