From c5a873df96e4a797426e4dd5eafe5b43f7aea564 Mon Sep 17 00:00:00 2001 From: wei <kaede@kaededeMacBook-Air.local> Date: 星期六, 19 十二月 2020 15:41:53 +0800 Subject: [PATCH] 20201218-2 --- HDL-ON_Android/Application.cs | 46 ++++++++++++++++++++++++++-------------------- 1 files changed, 26 insertions(+), 20 deletions(-) diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs index 0325145..3d80e26 100644 --- a/HDL-ON_Android/Application.cs +++ b/HDL-ON_Android/Application.cs @@ -67,24 +67,29 @@ //鑾峰彇鏋佸厜鎺ㄩ�両D GetJPushRegistrationID(activity); - BaseActivity.NetworkStateChanged += (int obj) => + BaseActivity.NetworkStateChanged += (int internetStatus) => { - if (!IsEnterBackground) - { - //BusSocket.Stop(); - new System.Threading.Thread(() => - { - System.Threading.Thread.Sleep(1000); - //BusSocket.Start(); - }) - { IsBackground = true }.Start(); - } - else - { - Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"); - } - MainPage.InternetStatus = obj; + //if (!IsEnterBackground) + //{ + // ////BusSocket.Stop(); + // //new System.Threading.Thread(() => + // //{ + // // System.Threading.Thread.Sleep(1000); + // // //BusSocket.Start(); + // //}) + // //{ IsBackground = true }.Start(); + + //} + //else + //{ + // Console.WriteLine("HHH 缃戠粶鍙樺寲浣嗗浜庡悗鍙�"); + //} + + //缃戠粶鍙樺寲澶勭悊 + HDLCommon.Current.UpdateInternetStatus((int)internetStatus, IsEnterBackground); }; + //寮�鍚畾浣嶆湇鍔� + Shared.Application.StartGPSLocationService(); }; BaseActivity.RefreshUIAction += (activity) => { @@ -103,23 +108,24 @@ //UserInfo.Current.unlockTime = DateTime.Now; }; + HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider"); //Shared.Application.IsGpsEnable = true; - //鑾峰彇缁忕含搴� Shared.Application.LocationAction = (lon, lat) => { try { Shared.Application.LocationAction = null; - Shared.Application.StopGPSLocationService(); new HDL_ON.DAL.Server.HttpServerRequest().GetCityInfo(lon.ToString(), lat.ToString()); + //鍏抽棴瀹氫綅鏈嶅姟 + Shared.Application.StopGPSLocationService(); } - catch + catch(Exception ex) { - + Utlis.WriteLine("GetCityInfo catch"+ ex.Message); } MainPage.Log($"缁忕含搴�:::{lon}:{lat}"); }; -- Gitblit v1.8.0