You can receive Information about location changes with the Location Update Callback
. Read more about it in the android developer docs. Here is a basic example on how you can detect if the location changed:
public class MainActivity extends ActionBarActivity implements LocationListener {
private Location mLastKnownLocation;
...
@Override
public void onLocationChanged(Location location) {
//location changed
mLastKnownLocation = location
}
}
}
Basically you just receive information about the current location if the location changed.
So in your case where you want to know every 5 min / 2 min if the location changed implement a timer, loop, etc. to check every 5 min / 2 min if you received a locationChangedEvent and the location changed or not