| | |
| | | import com.google.gson.Gson; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.linkpm.sdk.home.type.HomeType; |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.R; |
| | | import com.hdl.photovoltaic.base.CustomBaseActivity; |
| | | import com.hdl.photovoltaic.bean.MqttInfo; |
| | |
| | | import com.hdl.photovoltaic.internet.HttpServer.MyNanoHttpService; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | import com.hdl.photovoltaic.other.HdlDeviceLogic; |
| | | import com.hdl.photovoltaic.other.HdlFileLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlMqttLogic; |
| | | import com.hdl.photovoltaic.other.HdlThreadLogic; |
| | |
| | | //初始化mqtt客户端 |
| | | initMqttClient(); |
| | | |
| | | String path = HdlFileLogic.getInstance().getDriveRootPath() + "/036F6C1B.zip"; |
| | | MyNanoHttpServer.getInstance(AppManagerUtils.getAppManager().getIPAddress(HDLApp.getInstance())); |
| | | //MyNanoHttpServer.getInstance("127.0.0.1"); |
| | | Intent intentServer = new Intent(); |
| | | intentServer.setClass(HDLApp.getInstance(), MyNanoHttpService.class); |
| | | startService(intentServer); |
| | | |
| | | //实例化 获取ip 地址 |
| | | MyNanoHttpServer.getInstance(AppManagerUtils.getAppManager().getIPAddress(this)); |
| | | // MyNanoHttpServer.getInstance("127.0.0.1"); |
| | | Intent intent = new Intent(); |
| | | intent.setClass(this, MyNanoHttpService.class); |
| | | //启动服务监听 |
| | | startService(intent); |
| | | } |
| | | |
| | | private void initEvent() { |