| | |
| | | implementation project(path: ':third-zxing') |
| | | //Link本地库(在线依赖网络库) |
| | | implementation 'com.hdl.android:pmsdk:1.0.2' |
| | | implementation 'com.hdl.android:debugsdk:1.0.16' |
| | | implementation 'com.hdl.android:debugsdk:1.0.22' |
| | | |
| | | testImplementation 'junit:junit:4.13.2' |
| | | androidTestImplementation 'androidx.test.ext:junit:1.1.3' |
| | |
| | | * 初始化mqtt客户端 |
| | | */ |
| | | public void initMqttClient() { |
| | | if (MqttRecvClient.getInstance().isConnected()) { |
| | | //检查断开连接 |
| | | MqttRecvClient.getInstance().reConnect(); |
| | | } |
| | | if (!MqttRecvClient.getInstance().isInit()) { |
| | | HdlMqttLogic.getInstance().getMqttRemoteInfo(HomeType.A, new CloudCallBeak<MqttInfo>() { |
| | | @Override |
| | | public void onSuccess(MqttInfo info) { |
| | | if (info != null) { |
| | | MqttRecvClient.getInstance().setConnectParam(info.getUrl(), info.getClientId(), info.getUserName(), info.getPassWord(), null); |
| | | MqttRecvClient.getInstance().setConnectParam(info.getUrl(), info.getClientId(), info.getUserName(), info.getPassWord()); |
| | | MqttRecvClient.getInstance().connect(); |
| | | } |
| | | } |
| | |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_USERINFO = "refresh_userinfo";//刷新用户信息 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_TEMPERATURE = "temperature_format_changed";//刷新单位温度 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_REFRESH_REFRESH_UNREAD_NUMBER = "refresh_unread_messages_number";//刷新未读消息数量 |
| | | public final static String UNI_EVENT_NOTIFICATION_MQTT_CONNECT_SUCCESS= "mqtt_connect_success";//通知mqtt连接成功 |
| | | public final static String UNI_EVENT_NOTIFICATION_REMOVE_VIEW = "remove_view";//通知uni移除界面 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_ADD = "add";//设备添加 |
| | | public final static String UNI_EVENT_NOTIFICATION_DEVICE_DEL = "del";//设备删除 |