I want to use google map in my android app in specific area. for example in special country. How can I check that my current location is in that place?
updates:
for example how to check that I am in New Delhi city
I want to use google map in my android app in specific area. for example in special country. How can I check that my current location is in that place?
updates:
for example how to check that I am in New Delhi city
Get city name from Location:
Geocoder geocoder = new Geocoder(this, Locale.getDefault());
List<Address> addresses = geocoder.getFromLocation(myLocation.getLatitude(), myLocation.getLongitude(), 1);
String cityName = addresses.get(0).getAddressLine(0);
//String stateName = addresses.get(0).getAddressLine(1);
//String countryName = addresses.get(0).getAddressLine(2);
For more: Displaying a Location Address
You can try using
LatLngBounds
andLatLngBounds.contains()