Ich habe das Problem, dass mein Dienst, der den LocationListener implementiert hat, ein GPSupdate alle 500ms empfängt, scheint es. Egal, was minTime ich in der Funktion requestLocationUpdates.requestLocationUpdates aktualisiert nicht auf Intervall in Android
Stück meines Codes:
public class LocationService extends Service implements LocationListener {
LocationManager locMan;
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
locMan = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
locMan.isProviderEnabled(android.location.LocationManager.GPS_PROVIDER;
locMan.requestLocationUpdates(LocationManager.GPS_PROVIDER, 60000, 1, this);
}
public void onLocationChanged(Location location) {
Log.d("Loc", "Location has been changed");
}
}
Aus-Taste in meiner Haupttätigkeit werde ich nenne Startservice(), danach sollte es im Hintergrund laufen, aber es gibt kontinuierliches Updates.