CountryCodePickerProject icon indicating copy to clipboard operation
CountryCodePickerProject copied to clipboard

Russian Federation phone number automatically detected as Kazakhstan

Open ElizavetaGorbunova opened this issue 3 years ago • 2 comments

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

  1. Select Russian Federation manually
  2. Enter valid phone number: +7 913 XXX XX XX
  3. Save phone number. In my case, it is sent to the backend

Steps to reproduce

  1. Put saved phone number in the widget without adding Russian Federation to preferredCountries

Result : Kazakhstan detected Expected result: Russian Federation detected

I assume Kazakhstan is selected by default because of the alphabet order.

ElizavetaGorbunova avatar Sep 24 '21 08:09 ElizavetaGorbunova

You can set Russia like this: country_picker_view.setCountryForNameCode("ru")

AlexSuvorov2k avatar Nov 28 '21 11:11 AlexSuvorov2k

getCountryForNumber(context, getCCPLanguageFromLocale(context), "+7921xxxxx") -> KZ.

This is clearly a bug

vhartikainen avatar May 06 '24 13:05 vhartikainen