So, I'm trying to add functionality that, when you click on the phone number, will lead you to the Dialer application with a pre-populated number. I have the code below:
mContactDetailsText.setText(phonetextBuilder.toString());
Pattern pattern = Pattern.compile("[0-9]+\\s+[0-9]+");
Linkify.addLinks(mContactDetailsText, pattern, "tel:");
and the text is currently "T. 0123 4567890"
The current result is only that the specified line cannot be pressed. I even tried adding the following line, but no luck:
mContactDetailsText.setAutoLinkMask(0);
Has anyone got any ideas or can see what I'm doing wrong?
thank
source
share