| | |
| | | // return;
|
| | | // }
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY);
|
| | | params.addBodyParameter(Device.FieldNames.authorizationId, authorationId);
|
| | | params.addBodyParameter(Device.FieldNames.sn, authorationId);
|
| | | params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.ANDROID_DEVICE);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Device> places = resultBean.getListBeanOfType(Device.class);
|
| | |
| | | }
|
| | |
|
| | | public void saveLanSetting(Map<String, String> fields) {
|
| | |
|
| | | RequestParams params = new RequestParams(AppApi.BASE_URL + AppApi.Query.DEVICE_QUERY);
|
| | | params.addBodyParameter(Device.FieldNames.sn, authorationId);
|
| | | params.addBodyParameter(Device.FieldNames.type, CommonVariables.DeviceType.ANDROID_DEVICE);
|
| | | x.http().post(params, new BaseCommonCallBack() {
|
| | | public void success() {
|
| | | List<Device> places = resultBean.getListBeanOfType(Device.class);
|
| | | if (places.size() > 0) {
|
| | | BaseApplication.getInstance().setDevice(places.get(0));
|
| | | } else {
|
| | | Toast.makeText(BaseApplication.getInstance(), "数据库中找不到该设备", Toast.LENGTH_SHORT).show();
|
| | | }
|
| | | }
|
| | | });
|
| | |
|
| | |
|
| | | SharedPreferencesUtils.save(CommonVariables.DeviceSharedPreferences.LAN, fields);
|
| | | }
|
| | |
|