| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | MainPage.Log(ex.Message); |
| | | BaseActivity.VerifyDateTime = DateTime.MaxValue; |
| | | } |
| | | }; |
| | | |
| | |
| | | { |
| | | Language.CurrentLanguage = "English"; |
| | | } |
| | | |
| | | //获取极光推送ID |
| | | GetJPushRegistrationID(activity); |
| | | |
| | |
| | | //网络变化处理 |
| | | HDLCommon.Current.UpdateInternetStatus((int)internetStatus, MainPage.IsEnterBackground); |
| | | }; |
| | | //开启定位服务 |
| | | Shared.Application.StartGPSLocationService(); |
| | | }; |
| | | BaseActivity.RefreshUIAction += (activity) => |
| | | { |
| | |
| | | BaseActivity.OnResumeAction += (activity) => |
| | | { |
| | | checkSomeInfo(); |
| | | |
| | | |
| | | }; |
| | | BaseActivity.OnDestroyAction += (activity) => |
| | | { |
| | |
| | | //BusSocket.Stop(); |
| | | //UserInfo.Current.unlockTime = DateTime.Now; |
| | | }; |
| | | |
| | | |
| | | |
| | | HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider"); |
| | |
| | | } |
| | | MainPage.Log($"经纬度:::{lon}:{lat}"); |
| | | }; |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="activity"></param> |
| | | void GetJPushRegistrationID(BaseActivity activity) |
| | | { |
| | | |
| | | try |
| | | { |
| | | |
| | | //保存获取的极光服务器上的注册ID到本地文件 |
| | | var tokenID = JPushInterface.GetRegistrationID(activity); |
| | | Console.WriteLine("RegistrationID: " + tokenID); |
| | |
| | | { |
| | | //手机名称 Android.OS.Build.Manufacturer; |
| | | //OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer; |
| | | #if DEBUG |
| | | CN.Jpush.Android.Api.JPushInterface.SetDebugMode(true); |
| | | #endif |
| | | //#if DEBUG |
| | | //CN.Jpush.Android.Api.JPushInterface.SetDebugMode(true); |
| | | //#endif |
| | | CN.Jpush.Android.Api.JPushInterface.Init(this); |
| | | |
| | | } |
| | |
| | | base.Dispose(disposing); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询通知权限,并提示 |
| | | /// </summary> |
| | | public void QueryNotificationPermission() |
| | | { |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |