| | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.JsonObject; |
| | | import com.google.gson.reflect.TypeToken; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.linkpm.sdk.device.bean.DeviceOidInfoBean; |
| | |
| | | //用户头像(旧平台逻辑是头像单独获取下载地址) |
| | | case HDLUniMP.UNI_EVENT_REPLY_USER_IMAGE: { |
| | | uniGetImageKey(mode_type, data, callback); |
| | | } |
| | | break; |
| | | //用户本地缓存信息 |
| | | case HDLUniMP.UNI_EVENT_REPLY_USER_LOCAL_INFO: { |
| | | JsonObject jsonObject = new JsonObject(); |
| | | jsonObject.addProperty("user_name", UserConfigManage.getInstance().getUserName()); |
| | | jsonObject.addProperty("user_image_url", UserConfigManage.getInstance().getUserImageUrl()); |
| | | uniCallbackData(mode_type, jsonObject, callback); |
| | | } |
| | | break; |
| | | } |
| | |
| | | // com.alibaba.fastjson.JSONArray jsonArray = JSON.parseArray(data); |
| | | try { |
| | | String devices = getKeyValue("devices", getKeyValue("data", data)); |
| | | String homeId = UserConfigManage.getInstance().getHomeId(); //getKeyValue("homeId", getKeyValue("data", data)); |
| | | Gson gson = new Gson(); |
| | | Type typeOfT = new TypeToken<List<GatewayBean>>() { |
| | | }.getType(); |
| | |
| | | uniCallbackData(type, null, -100, HDLApp.getInstance().getString(R.string.The_gateway_cannot_be_found_locally), callback); |
| | | return; |
| | | } |
| | | String homeId = UserConfigManage.getInstance().getHomeId(); |
| | | //记录条数 |
| | | AtomicInteger atomicInteger = new AtomicInteger(0); |
| | | final boolean[] is_boolean = {false}; |