Is there a way to check if a webview is uptodate?

问题: I have an app which basically shows a website in a WebView. I am using urlOverriding and using tel: tag allows the user to make calls to the numbers on the webpage. In most...

问题:

I have an app which basically shows a website in a WebView. I am using urlOverriding and using tel: tag allows the user to make calls to the numbers on the webpage. In most devices, it works fine. But problem occurring in a few devices, not allowing to make a call. Nothing happens when clicking on the number.

I have already checked with Android versions. Another device with the same android version doesn't have any issue.

     if (url.startsWith("tel:")) {

                makePhoneCall(url);
                return true;
            }

makePhoneCall()

    public void makePhoneCall(String phoneNumber) {
    if (ContextCompat.checkSelfPermission(MainActivity.this,
            Manifest.permission.CALL_PHONE) != PackageManager.PERMISSION_GRANTED) {

        ActivityCompat.requestPermissions(MainActivity.this, new String[]{Manifest.permission.CALL_PHONE}, REQUEST_CALL);
        checkPermissions();
    } else {
        startActivity(new Intent(Intent.ACTION_CALL, Uri.parse(phoneNumber)));
    }

}

Is this because of the user's device's Android system Web view is outdated? I am having lot more issues like these. What can I do here?


回答1:

Does your app has permission to make call? It can be issue with permission

  • 发表于 2019-02-21 00:33
  • 阅读 ( 167 )
  • 分类:sof

条评论

请先 登录 后评论
不写代码的码农
小编

篇文章

作家榜 »

  1. 小编 文章
返回顶部
部分文章转自于网络,若有侵权请联系我们删除