I was wondering how I would go about getting the closest city name based on the phones current location or IP address on an Android device. I’m open to using other APIs in order to translate GPS coordinates or IP addresses to city names. What is the best method to do this? (I’m not using the Google Maps front end but I’d be open to using the API).
Best
You can us the GeoCoder which is avalilable in android.location.Geocoder package. The JavaDocs are here
JavaDocs here
Sample Code