mac
2024-03-13 4a2d7f9ac055d10ba7baf58df690e0ad62826f52
app/src/main/java/com/hdl/photovoltaic/HDLApp.java
@@ -195,16 +195,15 @@
                //断开mqtt连接
                if (MqttRecvClient.getInstance() != null) {
                    MqttRecvClient.getInstance().stop();
                    MqttRecvClient.getInstance().disConnect();
                }
                //断开所有tcp连接且清空连接缓存
                // TODO: 10/10/23
//                TcpSocketBoot.stopAllConnectLinkGateway();
//                    if(null!=HDLUniMPSDKManager.getInstance().getUniMP()){
//                        LogUtils.d("asdfasdfasdfsdf我被删除啦");
//                        HDLUniMPSDKManager.getInstance().getUniMP().closeUniMP();
//                    }
//                    initDCUniMPSDK();
                if (null != HDLUniMPSDKManager.getInstance().getUniMP()) {
                    HDLUniMPSDKManager.getInstance().getUniMP().closeUniMP();
                }
                initDCUniMPSDK();
                Intent intent = new Intent(getInstance(), HomeLoginActivity.class);
                intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                if (type == 1) {
@@ -312,25 +311,4 @@
            HdlLogLogic.print("测试Mqtt连接服务端失败--->");
        }
    }
    /**
     * 初始化mqtt客户端
     */
    public void initMqttClient() {
        HdlMqttLogic.getInstance().getMqttRemoteInfo(HomeType.A, new CloudCallBeak<MqttInfo>() {
            @Override
            public void onSuccess(MqttInfo info) {
                if (info != null) {
                    MqttRecvClient.init(HDLApp.getInstance(), info.getUrl(), info.getClientId(), info.getUserName(), info.getPassWord());
                }
            }
            @Override
            public void onFailure(HDLException e) {
                HdlLogLogic.print("读取mqtt远程信息失败--->" + e.getMessage(), e.getCode(), true);
            }
        });
    }
}