2010-02-05 74 views
0

我的Android手機上的GPS上,由事實的支持:GPS是對的,但的LocationManager返回null

location_manager.isProviderEnabled(LocationManager.GPS_PROVIDER) 

返回true。

然而,下面一行:

Location location = location_manager.getLastKnownLocation(LocationManager.GPS_PROVIDER) ; 

返回null。

可能是什麼原因?

謝謝。

回答

3

您應該請求位置更新並等待第一個。