Answers for "android webview mailto handling"

6

android studio webview mailto

webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                if( URLUtil.isNetworkUrl(url) ) {
                    return false;
                }

                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity( intent );
                return true;
            }
        });
Posted by: Guest on January-12-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language