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?