Пример #1
0
 @Override
 public void onLocationChanged(Location location) {
   if (isLocationAcceptable(location)) {
     removeUpdates();
     reportLocationFound(location);
   }
 }
Пример #2
0
 @Override
 public void onStop() {
   removeUpdates();
 }
 @Override
 protected void onDestroy() {
   mMyLocationManager.removeUpdates();
   super.onDestroy();
 }