title: Have some troubles with get fresh coordinates
body: <p>Here is my code. Actually, I want to use this service to get user's fresh coordinates. In my test it didn't work well. I didn't get a good location. And it seem never call mobile's GPS to update the coordinates. Is my code has bug or my phone has problem? Thanks</p>
  
  <pre><code>public class LocationService extends Service implements LocationListener {
  Boolean isWifiEnable;
  Boolean isGPSEnable;
  Context context;
  Location location;
  private static final long MIN_DISTANCE = 10;
  private static final long MIN_TIME = 1000 * 60;
  
  public LocationService(Context context) {
  
      this.context = context;
      bestLastKnownLocation();
  }
  
  public Location getLocation() {
      return location;
  }
  
  public Location bestLastKnownLocation() {
  
      location = null;
      String provider = null;
      // Acquire a reference to the system Location Manager
      LocationManager lm = (LocationManager) context.getSystemService(LOCATION_SERVICE);
        // location = lm.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
      isGPSEnable = lm.isProviderEnabled(LocationManager.GPS_PROVIDER);
      isWifiEnable = lm.isProviderEnabled(LocationManager.NETWORK_PROVIDER);
      // Define a listener that responds to location updates
  
      if (isGPSEnable == false &amp;&amp; isWifiEnable == false) {
          // no network provider is enabled
          //showToastInAsync("No provider");
      } else {
          if (isWifiEnable) {
              lm.requestLocationUpdates(LocationManager.NETWORK_PROVIDER,MIN_TIME, MIN_DISTANCE, this);
              provider = LocationManager.NETWORK_PROVIDER;
              Log.d("Network", "Network");
          }
          if (isGPSEnable) {
              if (lm == null) {
                  lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, MIN_TIME, MIN_DISTANCE, this);
                  provider = LocationManager.GPS_PROVIDER;
  
                  Log.d("GPS", "GPS");
              }
          }
  
          if (lm != null) {
              location = lm.getLastKnownLocation(LocationManager.PASSIVE_PROVIDER);
  </code></pre>
  
  <p>// At here  other PROVIDER doesn't work. Only passive work it is strange.</p>
  
  <pre><code>        }
      }
  
      return location;
  }
  
  @Override
  public IBinder onBind(Intent intent) {
      // TODO: Return the communication channel to the service.
      throw new UnsupportedOperationException("Not yet implemented");
  }
  
  @Override
  public void onLocationChanged(Location location) {
  
  }
  
  @Override
  public void onStatusChanged(String provider, int status, Bundle extras) {
  
  }
  
  @Override
  public void onProviderEnabled(String provider) {
  
  }
  
  @Override
  public void onProviderDisabled(String provider) {
  
  }
  </code></pre>
  
  <p>}</p>