I added a gps status listener to my location manager in order see when I get the first fix.
When I receive the GPS_EVENT_FIRST_FIX I then loop through all the satellites, but why is none of them used in the fix? (usedInFix()).
My log says 'false' for all satellites?
final class GpsStatusListener implements GpsStatus.Listener {
public void onGpsStatusChanged(int i) {
if (i==GpsStatus.GPS_EVENT_FIRST_FIX) {
Log.d(APP, "gpsx.fixed.");
for (GpsSatellite sat:locationManager.getGpsStatus(null).getSatellites()) {
Log.d(APP, "gpsx.GpsStatus.Sat.fixed: " + sat.usedInFix());
}
}
}
}
Log:
gpsx.fixed.
gpsx.GpsStatus.Sat.fixed: false
gpsx.GpsStatus.Sat.fixed: false
gpsx.GpsStatus.Sat.fixed: false
seems to me like a bug or at least some 'unlogic', reported it at
来源:https://stackoverflow.com/questions/3287389/gpsstatuslistener-no-satellites-used-in-fix-although-status-is-gpsstatus-gps-ev