The first you need to define two variables
Location newLocation = null;
Location oldLocation = null;
and then, you can call onLocationChange loop to compare newLocation and oldLocation
oldLocation = newLocation;
newLocation = mLocationManager.getLastKnowLocation(LocationManager.GPS_PROVIDER);
so, you can compare them if you need!!!
like
the same and update or the order and update
沒有留言:
張貼留言