Created
May 1, 2012 19:13
-
-
Save cfjedimaster/2570618 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="cordova-1.6.1.js"></script> | |
<script src="webintent.js"></script> | |
<script> | |
function init() { | |
document.addEventListener("deviceready",deviceReady,false); | |
} | |
function deviceReady() { | |
console.log("Device Ready"); | |
window.plugins.webintent.getUri(function(url) { | |
if(url !== "") { | |
// url is the url the intent was launched with | |
document.querySelector("#test").innerHTML = "URL was "+url; | |
} | |
}); | |
} | |
</script> | |
</head> | |
<body onload="init()"> | |
<h1>Test</h1> | |
<div id="test"></div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment