javascript - How to have Android webview open links that are target “_blank” in default browser -
how have android webview open links target “_blank” in default browser , tried following code still show links webview , 1 have solution ?
public boolean shouldoverrideurlloading(webview view, string url) { string myalternativeurl = "http://example.com"; if (!url.equals(myalternativeurl)) { { intent = new intent(intent.action_view); i.setdata(uri.parse("http://example.com")); startactivity(i); } return true; } else { view.loadurl(url); return true; } }
Comments
Post a Comment