title: Will onLocationChanged still get called even though it is not in the Service's onStart?
body: <p>I have a Service that needs to get the user's location when they move.  I haven't been able to figure out how to put onLocationChanged inside onStart, so I just put it outside.  Will it still be called when the user moves?  If not, how would I call it in onStart?</p>
  
  <pre><code>public class myService extends Service implements LocationListener {
  Double lat;
  Double lng;
  
  @Override
  public IBinder onBind(Intent arg0) {
  return null;
  }
  
  @Override
  public int onStartCommand(Intent intent, int flags, int startId) {
  // Let it continue running until it is stopped.
  Toast.makeText(this, "Service Started", Toast.LENGTH_LONG).show();
  
  
  
  
  
  return START_STICKY;
  
  }
  
  @Override
  public void onDestroy() {
  super.onDestroy();
  Toast.makeText(this, "Service Destroyed", Toast.LENGTH_LONG).show();
  
  }
  
  
  
  @Override
  public void onLocationChanged(Location location) {
  
  if (MainActivity.location != null) {
  
  
     lat = MainActivity.location.getLatitude();
  
      lng = MainActivity.location.getLongitude();
  
  
      if (MainActivity.placeArrayList.size() != 0) {
          for (int i = 0; i &lt; MainActivity.placeArrayList.size(); i++) {
  
  
              Log.e("hello", String.valueOf(Float.parseFloat(MainActivity.latitudeArrayList.get(i))));
  
              MainActivity.destination.setLatitude(Double.parseDouble(MainActivity.latitudeArrayList.get(i)));
              MainActivity.destination.setLongitude(Double.parseDouble(MainActivity.longitudeArrayList.get(i)));
              Log.e("distancemeters", String.valueOf(MainActivity.location.distanceTo(MainActivity.destination)));
  
              if (MainActivity.location.distanceTo(MainActivity.destination)&lt;100) {
  
  
  
  
                  AudioManager audioManager = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
  
                  audioManager.setStreamVolume(AudioManager.STREAM_RING, AudioManager.RINGER_MODE_SILENT, AudioManager.FLAG_SHOW_UI);
  
  
              } else {
  
  
  
              }
  
          }
  
  
      }
  }
  
  }
  
  @Override
  public void onStatusChanged(String provider, int status, Bundle extras) {
  
  }
  
  @Override
  public void onProviderEnabled(String provider) {
  
  }
  
  @Override
  public void onProviderDisabled(String provider) {
  
  }
  }
  </code></pre>