| | |
| | | houseInfoBean.setInstalledCapacity(houseIdBean.getInstalledCapacity());//装机容量 |
| | | houseInfoBean.setPower(houseIdBean.getPower());//发电功率 |
| | | houseInfoBean.setTodayElectricity(houseIdBean.getTodayElectricity());//今天发电量 |
| | | houseInfoBean.setPowerStationStatus(houseIdBean.getPowerStationStatus());//电站状态(电站状态 1:正常(运行),2:离线,3:连接中,4:故障) |
| | | houseInfoBean.setPowerStationStatus(houseIdBean.getPowerStationStatus());//电站状态(电站状态 1:正常(运行),2:离线,3:连接中,4:故障) |
| | | //添加到本地缓存 |
| | | addHouseToLocalMemory(houseInfoBean); |
| | | } |
| | |
| | | json.addProperty("deviceName", Build.MODEL);//设备名称 |
| | | json.addProperty("deviceType", "Android");//设备类型 |
| | | json.addProperty("produce", AppConfigManage.isIsOnlineServer());//表示是否是正式服务器 |
| | | json.addProperty("pushToken", UserConfigManage.getInstance().getRegistrationID());//App的推送Token,在极光为RegId |
| | | json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken());//App的推送Token,在极光为RegId |
| | | json.addProperty("software", "PHOTOVOLTAIC");//软件来源 |
| | | json.addProperty("language", UserConfigManage.getInstance().getCurrentAppLanguage());//2.0追加的字段 |
| | | |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String jsonStr) { |
| | | public void onSuccess(String pushId) { |
| | | if (!TextUtils.isEmpty(pushId)) { |
| | | UserConfigManage.getInstance().setPushId(pushId); |
| | | UserConfigManage.getInstance().Save(); |
| | | } |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onSuccess(jsonStr); |
| | | cloudCallBeak.onSuccess(pushId); |
| | | } |
| | | |
| | | } |
| | |
| | | String requestUrl = HttpApi.POST_push_del; |
| | | JsonObject json = new JsonObject(); |
| | | json.addProperty("pushId", UserConfigManage.getInstance().getPushId()); |
| | | json.addProperty("pushToken", UserConfigManage.getInstance().getRegistrationID()); |
| | | json.addProperty("pushToken", UserConfigManage.getInstance().getPushToken()); |
| | | |
| | | HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() { |
| | | @Override |
| | |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |