- Home /
Get Android devices current country location
I want to find out which country a device is in. I don't need it as specific as lat and long, just the country name and it can't detect via devices language setting.
I've found this script which uses Reverse GeoLocation: https://gist.github.com/chuakc92/1097aee7cae5f9fb31320a99b521623f
This seems to be what I need, however, it doesn't output a location at the end. The only adjustments I made to the script was to add a load of debug logs to track the progress of the process, and it seems to stop after line 79: var locationList = location["results"] as List;
Doesn't anyone know why its not proceeding with the rest of the script?
Or if anyone knows another way to get the devices country?
Any help is appreciated.
Comment