Location changes can be obtained using the Location Update Callback . Read more about this in the Android developer documentation . Here is a basic example of how you can determine if a location has changed:
public class MainActivity extends ActionBarActivity implements LocationListener { private Location mLastKnownLocation; ... @Override public void onLocationChanged(Location location) {
Basically you just get the current location information if the location is changed .
So, in your case, when you want to know every 5 minutes / 2 min, if the change of location implements a timer, cycle, etc., to check every 5 min / 2 min if you got locationChangedEvent and the place has changed or not
source share