Exemplo n.º 1
0
 private void initLocationManager() {
   if ((mosaicUser != null) && (locationManager == null)) {
     locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
     for (String provider : providers) {
       if (locationManager.isProviderEnabled(provider)) initLocationUpdates(provider);
     }
   }
 }
Exemplo n.º 2
0
 @Override
 public void onProviderEnabled(String provider) {
   if (LocationManager.GPS_PROVIDER.equals(provider)
       || LocationManager.NETWORK_PROVIDER.equals(provider)) initLocationUpdates(provider);
 }