2
我使用google api客戶端進行位置更新,並始終返回速度0,但位置座標即將到來。我已經在摩托羅拉X2測試了這個應用雖然它在其他Android版本中正常工作。Android M Google api客戶端位置速度始終爲0,location.hasSpeed爲假
LocationRequest request = LocationRequest.create(); request.setPriority(Thresholds.PRIORITY_HIGH); // request.setInterval(GlobalData.GPS_INTERVAL); request.setFastestInterval(GlobalData.GPS_INTERVAL); LocationServices.FusedLocationApi.requestLocationUpdates(mGoogleApiClient, request, this)
任何幫助,將不勝感激:)。
林。我永遠花了我的時間來發現問題。嘗試打開谷歌地圖以及你自己的應用程序,你會看到職位與速度附加。我還沒有找到解決方案。你有嗎? – Lisandro