tags:

views:

17

answers:

2

Are there any inbuilt controls / APIs that will automatically pick up an email address or phone number when featured in the text of a control?

I'm told this is a common feature on BlackBerry, so what's the normal way of achieving this?

This is a UK only app if that makes a difference for phone number recognition etc.

+1  A: 

Have a look at net.rim.device.api.ui.component.ActiveAutoTextEditField

Richard
Thanks, I had done.
TreeUK
A: 

I wasn't able to find a way to use both the inbuilt pattern matching for phone numbers and emails along with some additional patterns for the other formats it would need to support. (00000)000000, (00000) 000000, 00000-000000, 00000 000000

It happens that in this case I had control over the data that gets sent to the phones so I added a property where I replaced the patterns I expected with the one the phones recognise.

Not the solution I wanted, but I couldn't find sufficient extensibility points to allow it.

TreeUK
Ah, in that case I hope someone who has previously solved this problem reads your question. I'm a bit surprised that you were'nt able to come up with a solution, but not having coded my own patterns I can't shed any more light on this.
Richard