| | |
| | | deviceInfoAdapter.setOnclickListener(new DeviceInfoAdapter.OnClickListener() { |
| | | @Override |
| | | public void onClick(int position, CloudInverterDeviceBean deviceBean) { |
| | | if (!deviceBean.isActivate()) { |
| | | HdlThreadLogic.toast(_mActivity, getString(R.string.device_not_activated)); |
| | | return; |
| | | } |
| | | // GatewayBean gatewayBean = new GatewayBean(); |
| | | // gatewayBean.setCategorySecondName(deviceBean.getCategorySecondName()); |
| | | // gatewayBean.setDevice_mac(deviceBean.getOsn()); |
| | |
| | | |
| | | public void requestPermissions(OnCallBeak onCallBeak) { |
| | | |
| | | //ACCESS_FINE_LOCATION 允许使用GPS定位 |
| | | //ACCESS_COARSE_LOCATION 允许使用WIFI热点或基站来获取粗略的定位 |
| | | //ACCESS_FINE_LOCATION 允许使用GPS定位 |
| | | //ACCESS_COARSE_LOCATION 允许使用WIFI热点或基站来获取粗略的定位 |
| | | String[] ary = PermissionUtils.checkPermission(_mActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}); |
| | | if (ary.length > 0) { |
| | | this.requestPermissions(ary, PermissionUtils.STATUS_SUCCESS); |
| | |
| | | } |
| | | |
| | | |
| | | } |
| | | } |