I convert WordPress website to android app, in my website lots of external links i need to open external links browser like telegram, in telegram all external links open in external browser in the app
Problem SOlved guys thanks for your replays
webView.setWebViewClient(new WebViewClient(){
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url != null && (url.startsWith("http://") || url.startsWith("https://"))) {
view.getContext().startActivity(
new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
return true;
} else {
return false;
}
}
});