IamはGPS FirstTimeからCurrentLocationをすばやく取得する方法は?
locationManager = (LocationManager) getSystemService(LOCATION_SERVICE);
Criteria criteria = new Criteria();
String bestProvider = locationManager.getBestProvider(criteria, true);
locationManager.requestLocationUpdates(bestProvider, 0, 0, this);
location = locationManager.getLastKnownLocation(bestProvider);
を使用していますが、 であれば、それは
、developer.android.comに読んnull.I私を与える場所object.Alwaysを与えていない第1の時間は、「キャッシュされた場所が却下されますあまりにも古い "
しかし、2回目は位置の更新を提供しています。私の問題を解決する方法。
よろしく、 Androidデベロッパー