I am implementing In App Purchase.In the in app product list,I have configured few products for country A and few products for country B. So my application should show only those products configured for country A for a user in country A and similarly for user in country B. So when my app communicates with my content server, the app should be able to send the device country with server requests. How can I achieve this?
I have used TelephonyManager : getNetworkCountryIso () method to get the Mobile Country Code(MCC). But the documentation says "Only when user is registered to a network. Result may be unreliable on CDMA networks" Also, when i tried this,
- on Samsung devices(2.3) with wifi internet, no sim, i got the code
- on samsung device(2.3) with sim,no internet connectivity, i got the code
- on lg (2.2) with wifi, no sim i got the code
- xperia x10 (2.1) with wifi internet,no sim .. i did not get the code
- xperia x10 (2.3) with sim,with internet conncetion.. i got the code
All where gsm. I can't figure out why i couldn't get the mcc for 4th case?
Also, how does google identify the country of the device for filtering applications in market?
Any idea?
Edit: I tried in Dell Venue (2.2) with wifi, without sim: i did not get the MCC
i think google checks for either getSimCountryIso. This is usually reliable. But i maybe wrong