What is the best way to get the country code?
As of now, I know two ways. One is to get by TelephonyManager and another by Locale. Which is another best and unique wa
I think the IP address is the best way because it will give you the country where the phone is at the moment.
If you do it by
Locale.getDefault().getCountry();
you get the country where the user select the country, so you can have selected England, and you can be in Spain and maybe you need to know where he/she is at the moment.
Example: imagine that your app can buy something only in England. The user is from Spain, but he/she is on holidays in England and he/she wants to buy your product ... if you use
Locale.getDefault().getCountry();
that user won't be able to buy your product, so the IP address is the best way I think.