| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.8.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307131"> |
| | | <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.8.1" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202307141"> |
| | | <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> |
| | | <uses-permission android:name="android.permission.RECEIVE_SMS" /> |
| | | <!--友盟--> |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Text; |
| | | using HDL_ON.DAL.Mqtt; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI; |
| | |
| | | MainPage.Log($"网关云端在线,刷新设备状态"); |
| | | new System.Threading.Thread(() => |
| | | { |
| | | System.Threading.Thread.Sleep(1000); |
| | | int count = 20; |
| | | while (true) |
| | | { |
| | | System.Threading.Thread.Sleep(500); |
| | | if (MqttClient.isSubscribeSuccess || count<1) |
| | | { |
| | | break; |
| | | } |
| | | count--; |
| | | } |
| | | FunctionList.List.ReadAllFunctionStatus(); |
| | | }) |
| | | { IsBackground = true, Priority = System.Threading.ThreadPriority.AboveNormal }.Start(); |
| | |
| | | StartCloudMqtt(); |
| | | } |
| | | |
| | | static bool isSubscribeSuccess; |
| | | public static bool isSubscribeSuccess; |
| | | /// <summary> |
| | | /// 订阅主题 |
| | | /// </summary> |
| | |
| | | #endregion |
| | | |
| | | |
| | | Utlis.WriteLine("开始订阅!"); |
| | | var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { |
| | | Utlis.WriteLine("开始订阅!"); |
| | | var result = await RemoteMqttClient.SubscribeAsync(new MqttTopicFilter[] { |
| | | pirStatus,pirStudy, |
| | | appDeviceRefresh,appHomeRefresh,appRoomRefresh,residenceChange, |
| | | topicFilterPush2, topicAlinkStatus ,mqttkeyChange, |