Skip to content

Instantly share code, notes, and snippets.

@raulriera

raulriera/gist:4579638

Last active Dec 11, 2015
Embed
What would you like to do?
Since android doesn't support opening the market from web views. This seems like a pretty good hack. Idea from http://stackoverflow.com/questions/3583264/support-for-other-protocols-in-android-webview
webView.addEventListener("load", function(e){
if (e.url != null && e.url.indexOf("market://") != -1) {
// Open the URL from the device
Titanium.Platform.openURL(e.url);
// Reset the URL to the initial one
webView.url = url; // url is set somewhere in your code
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.