| | |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | protected void onResume() { |
| | | super.onResume(); |
| | | //启动页与mainActivity样式一样,这样启动页和mainActivity看上去是一个界面,目的是为了mainActivity遮住下一页; |
| | | AppManagerUtils.getAppManager().finishActivity(StartActivity.class); |
| | | // AppManagerUtils.getAppManager().finishActivity(StartActivity.class); |
| | | portConflictDialog(); |
| | | // Intent intent = new Intent(_mActivity, MyPowerStationActivity.class); |
| | | // intent.setFlags(Intent.Intent.FLAG_ACTIVITY_REORDER_TO_FRONT); |
| | |
| | | @Override |
| | | public void onSuccess(MqttInfo info) { |
| | | if (info != null) { |
| | | MqttRecvClient.getInstance().setConnectParam(info.getUrl(), info.getClientId(), info.getUserName(), info.getPassWord()); |
| | | MqttRecvClient.getInstance().setConnectParam(info.getUrl(), info.getClientId(), info.getUserName(), info.getPassWord(), null); |
| | | MqttRecvClient.getInstance().connect(); |
| | | } |
| | | } |
| | |
| | | HdlThreadLogic.runSubThread(new Runnable() { |
| | | @Override |
| | | public void run() { |
| | | //防止app启动的时候没有网络(app也登录不了),导致获取不了mqtt远程连接信息; |
| | | initMqttClient(); |
| | | HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(UserConfigManage.getInstance().getHomeId(), new CloudCallBeak<List<GatewayBean>>() { |
| | | @Override |
| | | public void onSuccess(List<GatewayBean> obj) { |