Android Google Play服务位置API强制GPS

Android Google Play服务位置API强制GPS,android,gps,location,Android,Gps,Location,我的应用程序需要GPS精度 我正在使用新的保险丝位置API 看起来,如果另一个应用程序正在使用GPS,那么我将获得具有GPS精度的位置更新,否则位置更新将具有网络精度 是否有办法强制fuse location service激活GPS或我是否需要使用旧的LocationManager API 以下是我用于创建API客户端和请求位置更新的代码的相关部分: googleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbac

我的应用程序需要GPS精度

我正在使用新的保险丝位置API

看起来,如果另一个应用程序正在使用GPS,那么我将获得具有GPS精度的位置更新,否则位置更新将具有网络精度


是否有办法强制fuse location service激活GPS或我是否需要使用旧的LocationManager API

以下是我用于创建API客户端和请求位置更新的代码的相关部分:

googleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationServices.API).build();
googleApiClient.connect();
在onConnected方法中,我有以下内容:

locationRequest = new LocationRequest();
locationRequest.setInterval(1000 * 60);
locationRequest.setFastestInterval(1000 * 30);
locationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);

LocationServices.FusedLocationApi.requestLocationUpdates(googleApiClient, locationRequest, this);

“有没有办法强制引信定位服务激活GPS”-AFAIK,没有。您可以请求
优先级\u高精度
,就像您看起来正在做的那样。但是,由Play Services location stuff的开发者决定如何处理。因此,在这种情况下,最好使用LocationManager,对吗?如果您仍然存在问题,请告诉我您在清单文件中对位置使用的权限是什么?@A.Edwar我使用的是android.permission.ACCESS\u FINE\u location,但我改用LocationManager来解决这个问题。所以我不知道保险丝的位置是否解决了问题。