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);
            }

 

相关文章:

  • 2022-12-23
  • 2021-10-25
  • 2021-06-08
  • 2021-08-07
  • 2021-10-30
  • 2022-01-01
猜你喜欢
  • 2021-06-04
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-24
  • 2021-05-26
相关资源
相似解决方案