title: In Android ,how to receive GPS location continuously?
body: <p>Issue in onLocationChanged() function of location listener of android.location.LocationListener.</p>
  
  <p>In Below code after requesting requestLocationUpdates of LocationManager, the onLocationChanged is called in uneven intervals, i.e i have set period at 1 second but i don't receive the location change after every second.</p>
  
  <pre><code>import android.content.Context;
  import android.location.Location;
  import android.location.LocationListener;
  import android.location.LocationManager;
  import android.os.Bundle;
  import android.util.Log;
  
  @SuppressWarnings("MissingPermission")
  public class SimplePositionProvider extends PositionProvider implements LocationListener {
  
  public SimplePositionProvider(Context context, PositionListener listener) {
  super(context, listener);
  
  Log.i("SimplePositionProvider", "start");
  if (!type.equals(LocationManager.NETWORK_PROVIDER)) {
  type = LocationManager.GPS_PROVIDER;
  }
  
  }
  
  public void startUpdates() {
  Log.i("startUpdates", "start");
  try {
  Log.i("requestLocationUpdates", "start");
  Log.i("TYPE", type);
  locationManager.requestLocationUpdates(type, period, 0, this);
  } catch (Exception e) {
  e.printStackTrace();
  Log.e(TAG, "error");
  }
  }
  
  public void stopUpdates() {
  Log.i("stopUpdates", "start");
  locationManager.removeUpdates(this);
  }
  
  @Override
  public void onLocationChanged(Location location) {
  Log.i("onLocationChanged", "start");
  updateLocation(location);
  }
  
  @Override
  public void onStatusChanged(String provider, int status, Bundle extras) {
  Log.i("onStatusChanged", "start");
  }
  
  @Override
  public void onProviderEnabled(String provider) {
  Log.i("onProviderEnabled", "start");
  }
  
  @Override
  public void onProviderDisabled(String provider) {
  Log.i("onProviderDisabled", "start");
  }
  
  }
  </code></pre>