I need to determine the country (iso3) the device is in even if the user’s device has GPS turned off and does not allow apps to access it’s location.
I also need to account for tablets that have no sim card and thus cannot use telephonyManager.
For this reason I don’t believe I can use the location manager (also because of these reasons: LocationManager requestLocationUpdates doesn't work)
Is this the best way to do it? What is the best open api to use?
Your approach of third party ip location api seems right to currently. May be This would help you
You can use the TelephonyManager
TelephonyManager tm = (TelephonyManager)this.getSystemService(this.TELEPHONY_SERVICE); String countryCode = tm.getNetworkCountryIso();
Since you cannot use telephony I would suggest trying this, as it get’s the users input from when they setup the device.
String locale = context.getResources().getConfiguration().locale.getCountry();