2
我正在使用位置服务(使用Google位置服务)在我的应用上实施位置管理器,并且正在寻找一种方法来检查设备系统上的位置是否已激活设置)。我正在像这样连接到位置服务器:Android位置服务 - 检查位置是否已激活
private synchronized void buildGoogleApiClient() {
mGoogleApiClient = new GoogleApiClient.Builder(mAppContext)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(LocationServices.API)
.build();
createLocationRequest();
}
private void createLocationRequest() {
mLocationRequest = new LocationRequest();
mLocationRequest.setInterval(INTERVAL);
mLocationRequest.setFastestInterval(FASTEST_INTERVAL);
mLocationRequest.setSmallestDisplacement(SMALLEST_DISPLACEMENT);
mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);
}
有没有办法检查系统的可用性位置设置?