Konstantin Selyuk
Konstantin Selyuk

Reputation: 207

Phone number recognition in sms body in android

I want to study how android works when sms sends. More precisely - I want to know how android recognizes phone number in sms body, like in the next photos:

For example, somebody sent me sms with the next text: You can use the next phone number: 0673452345 enter image description here

2) Then I opened this sms enter image description here

3) And after this, I clicked on the recognized phone number

enter image description here

So I want to know what class or couple of classes does (do) this recognition. May be someone knows where I can find this in android sources.

Help please!

Upvotes: 0

Views: 2971

Answers (3)

hchouhan02
hchouhan02

Reputation: 946

For This you can simply check for any 5 or more successive digits in string. If found then replace number by something like this. number and at time of show parse that and make a link for that.

Upvotes: 0

Henry
Henry

Reputation: 43788

I guess this is done within the application. Any sequence of successive digits (maybe within some bounds, at least x at most y digits) is interpreted as a phone number.

Upvotes: 0

Prakhar
Prakhar

Reputation: 2310

This is it click here this site has all things you want to know about sms please have a look at it. It contains sending and receiving of sms and all about it...

Upvotes: 0

Related Questions