| | |
| | | using CN.Jpush.Android.Api; |
| | | using HDL_ON; |
| | | using Java.Util; |
| | | using Microsoft.AppCenter; |
| | | using Microsoft.AppCenter.Analytics; |
| | | using Microsoft.AppCenter.Crashes; |
| | | using Shared; |
| | | |
| | | namespace HDL_ON_Android |
| | |
| | | public override void OnCreate() |
| | | { |
| | | //注册未处理异常事件 |
| | | Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "cb89f20750"); |
| | | AppCenter.Start("64ac5859-2cd7-4ef8-a5da-5455e29679ec", typeof(Analytics), typeof(Crashes)); |
| | | if (Shared.Application.Activity != null) |
| | | { |
| | | reStartApp(this); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.WriteLine(ex.Message); |
| | | MainPage.Log(ex.Message); |
| | | BaseActivity.VerifyDateTime = DateTime.MaxValue; |
| | | } |
| | | }; |
| | | |
| | |
| | | { |
| | | Language.CurrentLanguage = "English"; |
| | | } |
| | | Language.CurrentLanguage = "English"; |
| | | |
| | | //获取极光推送ID |
| | | GetJPushRegistrationID(activity); |
| | | |
| | |
| | | { |
| | | //手机名称 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); |
| | | |
| | | } |