Reputation: 664
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
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
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