From 16604a593202f2f87adf71abd57d036fe7da3b52 Mon Sep 17 00:00:00 2001 From: 黄学彪 <hxb@hdlchina.com.cn> Date: 星期一, 18 十一月 2019 10:39:42 +0800 Subject: [PATCH] 同步了全部的代码 --- ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs | 29 +++++++++++++++++++++++------ 1 files changed, 23 insertions(+), 6 deletions(-) diff --git a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs index b8058f2..2d85f92 100755 --- a/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs +++ b/ZigbeeApp/Shared/Phone/UserCenter/CommonBase/Logic/HdlWifiLogic.cs @@ -37,24 +37,40 @@ { get { - string ssiD = Shared.WiimuUPnP.SSID; +#if iOS + return string.Empty; +#endif +#if Android + string ssiD = null; + HdlThreadLogic.Current.RunThread(() => + { + Shared.Net.NetWiFi.GetWIFISSID((strId) => + { + ssiD = strId; + }); + }); + while (ssiD == null) + { + System.Threading.Thread.Sleep(50); + } if (string.IsNullOrEmpty(ssiD) == false && ssiD.StartsWith("\"") && ssiD.EndsWith("\"")) { ssiD = ssiD.Substring(1, ssiD.Length - 2); } return ssiD; +#endif } } #if Android /// <summary> /// 瀹氫箟鍏ㄥ眬鍙橀噺 /// </summary> - private Com.Hdl.Hdlelianzigbee.ElianNative hdlWiFi = null; + private Com.Mediatek.Elian.ElianNative hdlWiFi = null; #endif - #endregion +#endregion - #region 鈻� 涓�鑸柟娉昣__________________________ +#region 鈻� 涓�鑸柟娉昣__________________________ #if Android /// <summary> @@ -68,8 +84,9 @@ { if (hdlWiFi == null) { + Com.Mediatek.Elian.ElianNative.LoadLib(); //鍒濆鍖朩i-Fi閰嶇綉 - this.hdlWiFi = new Com.Hdl.Hdlelianzigbee.ElianNative(); + this.hdlWiFi = new Com.Mediatek.Elian.ElianNative(); hdlWiFi.InitSmartConnection(null, 1, 1); } //寮�濮媁i-Fi閰嶇綉 @@ -116,6 +133,6 @@ } #endif - #endregion +#endregion } } -- Gitblit v1.8.0