由网友(心里有座城,城里住着殇)分享简介:我加了一个GPS状态监听到我的位置管理器,以便看到时,我得到的第一个补丁。当我收到GPS_EVENT_FIRST_FIX然后,我在所有的卫星环,但在修复为什么没有人用? ( usedInFix())。我的日志说假的所有卫星?最后一类GpsStatusListener实现GpsStatus.Listener {公共无效o...
我加了一个GPS状态监听到我的位置管理器,以便看到时,我得到的第一个补丁。
当我收到GPS_EVENT_FIRST_FIX然后,我在所有的卫星环,但在修复为什么没有人用? ( usedInFix()
)。
我的日志说假的所有卫星?
最后一类GpsStatusListener实现GpsStatus.Listener {
公共无效onGpsStatusChanged(int i)以{
如果(我== GpsStatus.GPS_EVENT_FIRST_FIX){
Log.d(APPgpsx.fixed。);
对于(GpsSatellite坐:locationManager.getGpsStatus(空).getSatellites()){
Log.d(APPgpsx.GpsStatus.Sat.fixed:+ sat.usedInFix());
}
}
}
}
日志:
gpsx.fixed。
gpsx.GpsStatus.Sat.fixed:假的
gpsx.GpsStatus.Sat.fixed:假的
gpsx.GpsStatus.Sat.fixed:假的
解决方案
在我看来,像一个bug,或者至少一些unlogic,报道它在
HTTP://$c$c.google。 COM / P /安卓/问题/详细信息?ID = 10134
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
http://code.google.com/p/android/issues/detail?id=10134
相关推荐
最新文章