CountryCodePickerProject
CountryCodePickerProject copied to clipboard
Russian Federation phone number automatically detected as Kazakhstan
Russian Federation and Kazakhstan have the same dialing code +7
. Anyway, the country can be distinguish by DEF code.
DEF code for Kazakhstan is 6XX
or 7XX
. For Russian Federation, I don't see strict rules.
Here is the case when country is detected as Kazakhstan when it is Russian Federation:
Preconditions
- Select
Russian Federation
manually - Enter valid phone number:
+7 913 XXX XX XX
- Save phone number. In my case, it is sent to the backend
Steps to reproduce
- Put saved phone number in the widget without adding
Russian Federation
topreferredCountries
Result : Kazakhstan
detected
Expected result: Russian Federation
detected
I assume Kazakhstan
is selected by default because of the alphabet order.
You can set Russia like this: country_picker_view.setCountryForNameCode("ru")
getCountryForNumber(context, getCCPLanguageFromLocale(context), "+7921xxxxx")
-> KZ.
This is clearly a bug