简体   繁体   中英

err_unknown_url_scheme WebView

I have a WebView app that contain a wordpress site, built with elementor pro. I use a button that will allow the user to call or to navigate to an adress via waze. The issue is that it keeps giving me the

err_unknown_url_scheme

Few fixes that did't work.

public class MainActivity extends AppCompatActivity {
    private WebView myWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        myWebView = (WebView) findViewById(R.id.webView);
        WebSettings webSettings = myWebView.getSettings();
        myWebView.loadUrl("https://perfectskin.co.il/app/");
        myWebView.setWebViewClient(new WebViewClient());
        webSettings.setJavaScriptEnabled(true);
    }


    @Override
    public void onBackPressed() {
        if (myWebView.canGoBack()) {
            myWebView.goBack();
        }else {
            super.onBackPressed();
        }
    }
}

尝试将调用权限添加到清单文件。

 "android.permission.CALL_PHONE"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM