| | |
| | | JPushInterface.Init (this);//保存手机名称到本地文件 |
| | | //获取经纬度 |
| | | Shared.Application.LocationAction = (arg1, arg2) => { |
| | | Shared.Application.LocationAction = null; |
| | | System.Threading.Tasks.Task.Run (() => { |
| | | while (true) { |
| | | try { |
| | | Shared.SimpleControl.CommonPage.AirQuality = new service.hdlcontrol.com_WebServiceAirQuality.WebServiceAirQuality ().GetAirQuality (arg2.ToString (), arg1.ToString ()); |
| | | if (Shared.SimpleControl.CommonPage.AirQuality != null) |
| | | break; |
| | | } catch { } |
| | | } |
| | | Shared.Application.RunOnMainThread (() => { |
| | | if (CommonPage.RefreshAir != null) |
| | | CommonPage.RefreshAir (); |
| | | |
| | | try { |
| | | Shared.Application.LocationAction = null; |
| | | Shared.Application.StopGPSLocationService (); |
| | | |
| | | System.Threading.Tasks.Task.Run (() => { |
| | | while (true) { |
| | | try { |
| | | Shared.SimpleControl.CommonPage.AirQuality = new service.hdlcontrol.com_WebServiceAirQuality.WebServiceAirQuality ().GetAirQuality (arg2.ToString (), arg1.ToString ()); |
| | | if (Shared.SimpleControl.CommonPage.AirQuality != null) |
| | | break; |
| | | } catch { } |
| | | } |
| | | Shared.Application.RunOnMainThread (() => { |
| | | if (CommonPage.RefreshAir != null) |
| | | CommonPage.RefreshAir (); |
| | | }); |
| | | }); |
| | | }); |
| | | } catch { |
| | | } |
| | | }; |
| | | } |
| | | void checkSomeInfo () |