I've got function which retutrns my current location.
public LatLng getCurrentLocation() {
LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
String provider = service.getBestProvider(criteria, false);
Location location = service.getLastKnownLocation(provider);
LatLng userLocation = new LatLng(location.getLatitude(),location.getLongitude());
//Log.e("Location",userLocation.latitude+ " x "+ userLocation.longitude);
return userLocation;
}
The problem is that when I moved to another location (50 km) I still returns previous location. Any ideas why is it so?