Phone Number Detection Issues

In my BB app, I want to identify phone numbers and also call these phone numbers. For this, I used ActiveRichTextField instead of LabelField . This field works great to detect phone numbers, but the problem I get is that it does not detect some numbers , especially Australia countries. It discovers India phone numbers perfectly, but not for Australia and some other numbers. What I did for this is published below:

 ActiveRichTextField descField; if (isFocaseble) { descField = new ActiveRichTextField(replacedString.trim(), ActiveRichTextField.FIELD_LEFT | ActiveRichTextField.USE_ALL_WIDTH | ActiveRichTextField.FOCUSABLE) 

I checked here if it is focused or not, because you need to get integers just because there is other data that does not need focusing, and replacedString is what the data gets from the webservice. Below are screenshots of my screen through which you can get a clear idea of โ€‹โ€‹my problem.

(1) The following are Australia numbers :

enter image description here

(2) Australia numbers

enter image description here

(3) Numbers of India

enter image description here

Does anyone have any ideas regarding this? Why can't I find integers and where am I missing?

Any help would be noticeable.

+4
source share

Source: https://habr.com/ru/post/1444256/


All Articles