When it changes the position it is not updating the latitude and longitude so giving old values instead of giving new latitude and longitude values.
location.setListener(new SimpleLocation.Listener() {
public void onPositionChanged() {
// new location data has been received and can be accessed
latitude_user = location.getLatitude();
longitude_user = location.getLongitude();
}
When it changes the position it is not updating the latitude and longitude so giving old values instead of giving new latitude and longitude values.