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

 

posted on 2017-05-26 14:52  龙种人  阅读(463)  评论(0编辑  收藏  举报