Google Play Fused Location和setInterval

时间:2014-08-23 16:03:08

标签: android location google-play-services

我正试图通过 Google Play Fused Location 获取设备的位置,一切正常,但似乎不尊重请求的时间间隔:

LocationClient myLocationClient;
myLocationClient = new LocationClient(context, this, this);
myLocationClient.connect();

...

LocationRequest myLocationRequest = LocationRequest.create();
myLocationRequest.setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY);
myLocationRequest.setInterval(10000);
myLocationRequest.setFastestInterval(10000);
myLocationClient.requestLocationUpdates(myLocationRequest, this);

无论我在 setInterval setFastestInterval 上写入10000,10000或100万,每次更改位置时都会触发请求。

为什么?

感谢。

0 个答案:

没有答案
相关问题