| | |
| | | package com.mm.android.deviceaddmodule.openapi;
|
| | |
|
| | | import android.content.Intent;
|
| | | import android.text.TextUtils;
|
| | |
|
| | | import com.google.gson.Gson;
|
| | |
| | | }
|
| | | String code = jsonResult.get("code").getAsString();
|
| | | if (!"0".equals(code)) {
|
| | | // try {
|
| | | try {
|
| | | String msg = jsonResult.get("msg").getAsString();
|
| | | if (method.equals("bindDevice")) {
|
| | | Intent intent = new Intent();
|
| | | intent.setAction("hdlUserDeviceBind");
|
| | | intent.putExtra("data", jsonResult.toString());
|
| | | LCDeviceEngine.newInstance().getContext().sendBroadcast(intent);
|
| | | }
|
| | | throw new BusinessException(code + msg);
|
| | | // }catch (Exception exception){
|
| | | // String msg = jsonResult.get("message").getAsString();
|
| | | // throw new BusinessException(code + msg);
|
| | | // }
|
| | | }catch (Exception exception){
|
| | | String msg = jsonResult.get("message").getAsString();
|
| | | if (method.equals("bindDevice")) {
|
| | | Intent intent = new Intent();
|
| | | intent.setAction("hdlUserDeviceBind");
|
| | | intent.putExtra("data", jsonResult.toString());
|
| | | LCDeviceEngine.newInstance().getContext().sendBroadcast(intent);
|
| | | }
|
| | | throw new BusinessException(code + msg);
|
| | | }
|
| | | }
|
| | |
|
| | | JsonObject jsonData = new JsonObject();
|