Possible Duplicate:
What Country is the User Currently In?
How to programmatically detect in which country the android device is located currently without using GPS?
Is it possible to prevent an app, downloaded on the user's device, from launching based on the country of the user's device? How can I accurately determine the user's country?
My app will be available on both WiFi and Carrier (GSM/CDMA) based devices.
I know I can restrict the app to certain geographies on Google Play but there is nothing preventing users from downloading the app here in US and then travelling to their own country and using the app. So, I want to exit the app soon as I know the user is outside of US. I can think of these mechanisms of determining the location but unsure if these are fool-proof:
- IMEI - not helpful, I can buy the device in US but use it anywhere
- SIM - I can use a SIM from US and be on roaming etc
- WiFi - don't think I can accurately tell the user's geo
- Date/Time settings - I can always pretend I am in US
- TelephonyManager - I couldn't tell if any methods here would help in accurately determining the location
What are my options?
Thanks!