TencentLocationRequest request = TencentLocationRequest.create();
            request.setRequestLevel(TencentLocationRequest.REQUEST_LEVEL_ADMIN_AREA);

            //设置是否使用GPS进行定位
            LocationManager locManager = (LocationManager) mContext.getSystemService(Context.LOCATION_SERVICE);
            if (locManager.isProviderEnabled(LocationManager.GPS_PROVIDER)){
                request.setAllowGPS(true);
            } else {
                request.setAllowGPS(false);
            }

 

相关文章: