Android-SmartWebView
Android-SmartWebView copied to clipboard
Phone link tel: crashed the app
Added some phone number links with the html format tel:88888888
The app crashes when I click any of them
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
}
...