This question is an exact duplicate of:
- onLocationChanged() is never trigered by requestLocationUpdate() - Android 2 answers
I have used manager.requestLocationUpdates("gps", 1800000, 1, new LocationDetector());
method of LocationManager manager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
class for getting update when either location change (device's location) is at least 1 meter (almost 40 inches), OR at least 30 minutes has passed. But the update is not being received when I change device's location by 1 meter (or even more). So what can be the problem? Please tell.
Code:
public class LocationDetector implements LocationListener {
@Override
public void onLocationChanged(Location location) {
Log.d("GPS: ",location.getLatitude()+", "+location.getLongitude());
}