I need to get the user current city name. If getting the city name with AGPS or anything is good. I need the method or code for getting the current city in android. Please share if you know.
This one is for getting location name from current lat,long
Geocoder gcd = new Geocoder(context, Locale.getDefault());
List<Address> addresses = gcd.getFromLocation(lat, lng, 1);
if (addresses.size() > 0)
System.out.println(addresses.get(0).getLocality());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With