Brains
Brains

Reputation: 664

Get user’s country from SIM card

Can I retrieve user’s country from SIM card?

I found this thread wp7 access SIM programmatically, but it’s very old, maybe something changed since that time?

If I cannot do this, will be GPS the best way?
RegionInfo.CurrentRegion don’t work.

Upvotes: 0

Views: 493

Answers (2)

Brains
Brains

Reputation: 664

Alternative way: IP Address Geolocating.
It doesn't need an access to a SIM card. But it needs the Internet connection.

Retrieve the xml from here http://freegeoip.net/xml/ and get country from it.

Upvotes: 0

Roy Dictus
Roy Dictus

Reputation: 33139

The Issuer identification number (IIN) on the SIM card includes country identification which can be 2 digits (say, 44 for the UK) or 3 digits (say, 352 for Luxembourg).

So theoretically it would be possible, but Windows Phone (and that includes version 8) does not allow reading the SIM card's data.

Upvotes: 2

Related Questions