| | |
| | | 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) { |
| | |
| | | //监听网络状态变化 |
| | | 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(); |
| | |
| | | */ |
| | | private void initUniMqtt() { |
| | | try { |
| | | String ip = NetworkUtils.getIPAddress(this); |
| | | String ip = "10.10.35.79";//NetworkUtils.getIPAddress(this); |
| | | if (TextUtils.isEmpty(ip)) { |
| | | return; |
| | | } |