Android-SmartWebView icon indicating copy to clipboard operation
Android-SmartWebView copied to clipboard

Phone link tel: crashed the app

Open nodefive opened this issue 10 months ago • 1 comments

Added some phone number links with the html format tel:88888888

The app crashes when I click any of them

nodefive avatar Jan 27 '25 00:01 nodefive

update with this, I will also update the source code and add this in next release:

...
} else if (url.startsWith("tel:")) {
    Intent intent = new Intent(Intent.ACTION_DIAL, Uri.parse(url));

    // add try-catch block
    try {
        context.startActivity(intent);
    } catch (ActivityNotFoundException e) {
        Toast.makeText(context, "No dialer app found.", Toast.LENGTH_SHORT).show();
        Log.e("FCM_ERROR", "PORT_TEL", e); // logging the exception
    }
...

mgks avatar Feb 07 '25 06:02 mgks