Question

I am using the autoLink="All" feature of TextView to linkify all urls and telephone numbers in a TextView.

The problem I am facing is that on emulator, certain numbers are identified as phone numbers and are clickable. On real device, these numbers doesnt get identified as phone numbers and are not clickable.

Say If the TextView contains a number 163111, On emulator it is clickable. Clickng this takes user to dialer. But on Nexus 7 this number is not clickable. I had a look at the Linkify.addLinks() method, which I thought would explain this behaviour, but failed to find an explanation.

Has any one faced this problem?

What may be the reason behind this?

Was it helpful?

Solution 2

Never mind. The emulator was running on 4.2 and Nex 7 was on 4.3

https://android.googlesource.com/platform/frameworks/base/+/430fc97

The modifications in Linkify code was the reason.

OTHER TIPS

try "autolink" property for textview.

android:autoLink="email|phone|web"

enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top