| | |
| | | }
|
| | |
|
| | | /// <summary>
|
| | | /// 当前wifi的SSID,也叫Wifi的名字
|
| | | /// 当前wifi的SSID,也叫Wifi的名字(取不到时,会返回null)
|
| | | /// </summary>
|
| | | public string SSID
|
| | | {
|
| | |
| | | ssiD = strId;
|
| | | });
|
| | | });
|
| | | int count = 0;
|
| | | while (ssiD == null)
|
| | | {
|
| | | System.Threading.Thread.Sleep(50);
|
| | | count++;
|
| | | if (count == 60)
|
| | | {
|
| | | //3秒超时
|
| | | return null;
|
| | | }
|
| | | }
|
| | | if (string.IsNullOrEmpty(ssiD) == false && ssiD.StartsWith("\"") && ssiD.EndsWith("\""))
|
| | | {
|
| | |
| | | }
|
| | | #endif
|
| | |
|
| | | /// <summary>
|
| | | /// 打开手机wifi设置界面
|
| | | /// </summary>
|
| | | public void OpenAppWifiSettion()
|
| | | {
|
| | | if (Application.DeviceType == Shared.Device.Android)
|
| | | {
|
| | | ///打开WI-IF界面
|
| | | CommonClass.OpenAction("android.settings.WIFI_SETTINGS");
|
| | | }
|
| | | else
|
| | | {
|
| | | CommonClass.OpenAction("App-Prefs:root=WIFI");
|
| | | }
|
| | | }
|
| | |
|
| | | #endregion
|
| | | }
|
| | | }
|