Mobile Country Code (MCC) on Windows Phone

celltowerTo make the long story short – it is not possible to access user’s Mobile Country Code from Windows Phone Application. Not even in Mango.

There are two places where MCC is used on a mobile phone. It is part of a International Mobile Subscriber Identiti (IMSI) and it is stored on SIM Card. It tells us where the user is from.

The other MCC is the current MCC – the country in which the user is now. Those two are the same if user is at home, and different if user is roaming.

Since we cannot access MCCs, we should use other ways to access the same info. It’s not as precise as a MCC but it could be goo enough for some scenarios.

Current Country – you can use GPS to get geolocation, and then resolve it to country name. The whole process is nicely explained here.

User’s home country – this one is harder, but if you assume that a user has a right regional settings set, you can use System.Globalization.RegionInfo.CurrentRegion.TwoLetterISORegionName property to get the region. If you need a MCC code, you can map it by using this XML file.

I agree – MCC would be easier, nicer, simpler and better – but this is all we can do for now. I hope this API will be available in the next update.

leave your comment