| | |
| | | import com.hdl.sdk.common.exception.HDLLinkException;
|
| | | import com.hdl.sdk.common.utils.IdUtils;
|
| | | import com.hdl.sdk.common.utils.IpUtils;
|
| | | import com.hdl.sdk.common.utils.LogUtils;
|
| | | import com.hdl.sdk.common.utils.SPUtils;
|
| | | import com.hdl.sdk.common.utils.ThreadToolUtils;
|
| | | import com.hdl.sdk.common.utils.gson.GsonConvert;
|
| | |
| | | @Override
|
| | | public void onMessage(Object msg) {
|
| | | if (msg instanceof LinkResponse) {
|
| | |
|
| | | LogUtils.e("sendMsg onSuccess");
|
| | | if (callBack != null) {
|
| | | callBack.onSuccess(msg.toString());
|
| | | }
|
| | | threadPool.shutdownNow();
|
| | | }
|
| | | LogUtils.e("sendMsg eventListener remove");
|
| | | EventDispatcher.getInstance().remove(eventTag, this);
|
| | | }
|
| | | };
|
| | |
|
| | |
| | | getTcp().sendMsg(data);
|
| | | } else {
|
| | | threadPool.shutdownNow();
|
| | | LogUtils.e("sendMsg eventListener remove");
|
| | | EventDispatcher.getInstance().remove(eventTag, eventListener);
|
| | | ThreadToolUtils.getInstance().runOnUiThread(new Runnable() {
|
| | | @Override
|