From 925e55bc815de89575ec53880d3e059596fda6e6 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期六, 19 十二月 2020 13:23:46 +0800
Subject: [PATCH] Merge branch 'CJL' into NewFilePath
---
HDL-ON_Android/Application.cs | 45 +++++++++++++++++++++++++--------------------
1 files changed, 25 insertions(+), 20 deletions(-)
diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index f676103..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) =>
{
@@ -108,19 +113,19 @@
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