开发者

How to find out the country of the user's SIM card on Android?

Is there a way to check what is the user's country? "Locale" isn't good enough because there are plenty of English locales but they are spread all over the world.

Maybe somehow with IMEI or...?

So actually I need to f开发者_Go百科ind out which country does the SIM card belong to?

EDIT: GPS or internet are not allowed.


android.telephony.TelephonyManager.getNetworkCountryIso()

More info Android documentation - TelephonyManager.

Edit: Depends what you are looking for. IMEI may not be relevant as the phone might have been ordered/bought from another country or the user might be in another country when using it. Also I don't know if the IMEI tells you the actual contry the device is being sold in, but rather the country of the manufacturer (not sure on this one though).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜