I'm writing an Android app in Java which displays information relating to Spain, including phone numbers.
I am using Linkify to make these phone numbers linkable when they're displayed using this code
Linkify.addLinks(textViewPlaceNotesDetailView, Linkify.PHONE_NUMBERS);
This works fine.
My problem is that other numbers are also appearing as links, ie. years like 1965.
How can I prevent this? I only want phone numbers to be links.
NB. I thought of specifying a minimum length for the number, in this case 9 (Spanish phone numbers are 9 digit in the format 'xxx xxx xxx'). But I haven't been able to figure out how to do this.