Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Android open allowed link only
public boolean shouldOverrideUrlLoading(WebView view, String url) {
Uri uri = Uri.parse(url);
if (uri.getHost() != null && uri.getHost().contains("")) {
return false;
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
return true;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment