| | |
| | | import com.hdl.photovoltaic.utils.LocalManageUtil; |
| | | import com.hdl.photovoltaic.utils.NetworkUtils; |
| | | import com.hdl.photovoltaic.utils.SharedPreUtils; |
| | | import com.hdl.photovoltaic.widget.ConfirmationCancelDialog; |
| | | import com.hdl.sdk.link.HDLLinkLocalSdk; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | import com.hdl.sdk.link.core.connect.HDLUdpConnect; |
| | |
| | | */ |
| | | public void initThirdSDK() { |
| | | // 小程序进程 |
| | | if (RuningAcitvityUtil.getAppName(getBaseContext()).contains("unimp")) { |
| | | if (RuningAcitvityUtil.getAppName(getBaseContext()).contains(":")) { |
| | | return; |
| | | } |
| | | if (isInitThirdSDK) { |
| | |
| | | // CrashReport.initCrashReport(this, Constant.BUGLY_APP_ID, true); |
| | | //6.初始化DCUniMPSDK |
| | | initDCUniMPSDK(); |
| | | this.initUniMqtt();//如果是部署到/手机上正式使用,注释掉这行代码就可 |
| | | // this.initUniMqtt();//如果是部署到/手机上正式使用,注释掉这行代码就可 |
| | | // //7.初始化自定义IconToast |
| | | // ToastUtils.getInstance().initIconToast(this); |
| | | // //8.对fastjson进行设置,解决fastjosn转换成字符串时首字母大小写问题 |
| | |
| | | //监听网络状态变化 |
| | | this.networkMonitoring(); |
| | | //初始化本地assets文件夹资源文件 |
| | | this.initLocalAssetsData(); |
| | | // this.initLocalAssetsData(); |
| | | |
| | | } |
| | | |
| | |
| | | if (mInfoMap != null) { |
| | | mInfoMap.clear(); |
| | | } |
| | | |
| | | //断开mqtt连接 |
| | | if (MqttRecvClient.getInstance() != null) { |
| | | MqttRecvClient.getInstance().disConnect(); |
| | | } |
| | | // //断开mqtt连接 |
| | | // if (MqttRecvClient.getInstance() != null) { |
| | | // MqttRecvClient.getInstance().disConnect(); |
| | | // } |
| | | //断开所有tcp连接且清空连接缓存 |
| | | // TODO: 10/10/23 |
| | | // TcpSocketBoot.stopAllConnectLinkGateway(); |