我使用的是融合位置API:
locationrequest = LocationRequest.create();
locationrequest.setInterval(interval);
locationrequest.setFastestInterval(interval);
locationrequest.setSmallestDisplacement(0);
locationrequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
LocationServices.FusedLocationApi.requestLocationUpdates(locationClient, locationrequest, this);每当我得到一个位置,我做loc.getProvider,我总是得到字符串“融合”。
我在期待网络和全球定位系统或者其他一些迹象。
有什么想法吗?
发布于 2015-01-25 01:55:44
这是FusedLocationApi的预期行为-它结合服务,以减少电力使用,并出于各种其他原因。
如果需要使用特定的提供程序,则需要http://developer.android.com/reference/android/location/package-summary.html
正如该页面所述,这不是获取位置的推荐方法。
如果您对处理返回位置的准确性感兴趣,最好在更新的基础上使用Location.getAccuracy()进行更新。
https://stackoverflow.com/questions/28132300
复制相似问题