Make a phone number callable in Android

You may want to present a number and make it callable.

 I tried different ways using different tags in android TextView, but what worked for me correctly is to put the number in a WebView and make it as a link with tel: prefix in href

Here is a simple method that takes a number and wrap it in a link tag to send it to WebView after that

public static String wrapAsCallablePhone(String number) {
return "<a href=\"tel:" + number + "\">" + number + "</a>";
}

Document Actions