mac
2024-07-25 3f6685c77beeb12baf840733fb890860f4c26e7c
HDL-ON_Android/Application.cs
@@ -12,9 +12,6 @@
using CN.Jpush.Android.Api;
using HDL_ON;
using Java.Util;
using Microsoft.AppCenter;
using Microsoft.AppCenter.Analytics;
using Microsoft.AppCenter.Crashes;
using Shared;
namespace HDL_ON_Android
@@ -110,6 +107,7 @@
                //后台回到前台
                new HDL_ON.UI.AppUnlockPage().LoadPage();
            }
        }
@@ -125,7 +123,6 @@
                multicast.Release();
                //进入后台
                UserInfo.Current.unlockTime = DateTime.Now;
            }
        }
@@ -153,7 +150,7 @@
        /// </summary>
        void BusSocketStop()
        {
            //IsEnterBackground = true;
            CloseTime = DateTime.Now;
            MainPage.IsEnterBackground = true;
            //进入后台mqtt正在连接重置状态
@@ -167,15 +164,12 @@
        /// </summary>
        void BusSocketStart()
        {
            //IsEnterBackground = false;
            if (CloseTime.AddSeconds(10) < DateTime.Now)
            {
                //后台超过10s就断开MQTT重连
                //if (HDL_ON.DriverLayer.Control.Ins.IsRemote)
                {
                    HDL_ON.DAL.Mqtt.MqttClient.DisConnectRemote("closeTime", false);
                    HDL_ON.DriverLayer.Control.Ins.GatewayOnline_Cloud = HDL_ON.DriverLayer.Control.Ins.GatewayOnline_Local = false;
                }
            }