Skip to content

Instantly share code, notes, and snippets.

@vargon
Created May 4, 2012 13:10
Show Gist options
  • Save vargon/2594719 to your computer and use it in GitHub Desktop.
Save vargon/2594719 to your computer and use it in GitHub Desktop.
Sample JavaScript URL Scheme implementation
function sendMessageToNative(msg) {
document.location = 'myscheme://a.com/?m=' + encodeURIComponent(JSON.stringify(msg));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment