• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

About Linkify Android

Hi guys, I am newbie in Android development. Currently I faced some problem to auto detect the address (within a long string) inside a TextView.

The content of TextView is "Prefer to be your own chef? Come here now: BBQ Plaza(Berjaya Time Squares) Berjaya Times Square, Lot 03-1151, Jalan Imbi, 55100, Wilayah Persekutuan Kuala Lumpur, Malaysia.
Tel: +603-21458811"

The valid address in the string is "Berjaya Times Square, Lot 03-1151, Jalan Imbi, 55100, Wilayah Persekutuan Kuala Lumpur, Malaysia." The following is the part of my java code:

Linkify.addLinks(TextView, Linkify.EMAIL_ADDRESSES | Linkify.PHONE_NUMBERS);

The outcome using "Linkify" is address unable to be detected, the phone number can be detected but the poscode "55100" and "03-1151" also marked as phone number.

Is there any way to proper detect the address and phone number besides using Linkify? or the way I using Linkify is incorrect? any solutions will help me, thanks.
 
Back
Top Bottom