From 9bc0ea236cad9e5c86d0d6fe03eabb327b693096 Mon Sep 17 00:00:00 2001 From: wxr <wxr@hdlchina.com.cn> Date: 星期三, 11 九月 2024 18:03:16 +0800 Subject: [PATCH] Update SplashActivity.cs --- HDL-ON_Android/SplashActivity.cs | 49 +++++++++++++++++++++++++++++-------------------- 1 files changed, 29 insertions(+), 20 deletions(-) diff --git a/HDL-ON_Android/SplashActivity.cs b/HDL-ON_Android/SplashActivity.cs index 76007c4..1cd1497 100644 --- a/HDL-ON_Android/SplashActivity.cs +++ b/HDL-ON_Android/SplashActivity.cs @@ -10,9 +10,7 @@ using Android.Support.V4.Content; using CN.Jpush.Android.Api; //using Android.Widget; -using Com.Hdl.ON.Jpush.Androidjpush; using HDL_ON; -using Java.Util; using Shared; namespace HDL_ON_Android @@ -59,12 +57,14 @@ //StartActivityForResult(i, 1); //OverridePendingTransition(0, 0); //initAll(); +#if DEBUG + HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy = true; +#endif if (HDL_ON.OnAppConfig.Instance.FirstRunApp || !HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy) { //OnAppConfig.Instance.FirstRunApp = false; //OnAppConfig.Instance.SaveConfig(); Language.CurrentLanguage = "Chinese"; - Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; Console.WriteLine("褰撳墠璇█缂╁啓:" + localeList.Language); if (localeList.Language == "zh") @@ -83,6 +83,10 @@ { Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈"; } + //else if (localeList.Language == "uk") + //{ + // Language.CurrentLanguage = "Ukraine"; + //} else { Language.CurrentLanguage = "English"; @@ -133,7 +137,7 @@ //#endif JPushInterface.Init(this); - Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "316a8f5d83"); + //Com.Chteam.Agent.BuglyAgentHelper.Init(this.ApplicationContext, "316a8f5d83"); BaseActivity.OnCreateActoin += (activity, application) => @@ -143,17 +147,17 @@ }; - try - { - //鍒濆鍖栧弸鐩焥dk - Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android"); - ////鍒濆鍖栧弸鐩焥dk config - Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android", ""); - } - catch (Exception ex) - { - Console.WriteLine("鍒濆鍖栧弸鐩烻DK寮傚父:" + ex.Message); - } + //try + //{ + // //鍒濆鍖栧弸鐩焥dk + // Com.Hdl.Umsdk.UmSdk.InitUmSdk(this, "61d565d9e0f9bb492bbc3d5a", "Android"); + // ////鍒濆鍖栧弸鐩焥dk config + // Com.Hdl.Umsdk.UmSdk.InitUMConfigure(this, "61d565d9e0f9bb492bbc3d5a", "Android", ""); + //} + //catch (Exception ex) + //{ + // Console.WriteLine("鍒濆鍖栧弸鐩烻DK寮傚父:" + ex.Message); + //} } @@ -198,7 +202,6 @@ BaseActivity.OnCreateActoin = (activity, application) => { Language.CurrentLanguage = "Chinese"; - Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; Console.WriteLine("褰撳墠璇█缂栧彿" + localeList.Language); if (localeList.Language == "zh") @@ -217,6 +220,10 @@ { Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈"; } + //else if (localeList.Language == "uk") + //{ + // Language.CurrentLanguage = "Ukraine"; + //} else { Language.CurrentLanguage = "English"; @@ -247,7 +254,6 @@ BaseActivity.RefreshUIAction = (activity) => { Language.CurrentLanguage = "Chinese"; - Locale locale1 = Locale.Default; var localeList = Resources.Configuration.Locale; Console.WriteLine("褰撳墠璇█锛�" + localeList.Language); if (localeList.Language == "zh") @@ -266,6 +272,10 @@ { Language.CurrentLanguage = "斜褗谢谐邪褉褋泻懈"; } + //else if (localeList.Language == "uk") + //{ + // Language.CurrentLanguage = "Ukraine"; + //} else { Language.CurrentLanguage = "English"; @@ -329,7 +339,7 @@ { //淇濆瓨鑾峰彇鐨勬瀬鍏夋湇鍔″櫒涓婄殑娉ㄥ唽ID鍒版湰鍦版枃浠� var tokenID = JPushInterface.GetRegistrationID(activity); - Console.WriteLine("RegistrationID: " + tokenID); + Console.WriteLine("鏋佸厜鎺ㄩ�両d: " + tokenID); if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID) { OnAppConfig.Instance.PushDeviceToken = tokenID; @@ -343,14 +353,13 @@ { System.Threading.Thread.Sleep(1000); tokenID = JPushInterface.GetRegistrationID(activity); - Console.WriteLine("Sleep.tokenID + " + JPushInterface.GetRegistrationID(activity)); loadTokenCount++; if (loadTokenCount > 30) { break; } } - Console.WriteLine("RegistrationID: " + tokenID); + Console.WriteLine("鏋佸厜鎺ㄩ�両d: " + tokenID); if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID) { OnAppConfig.Instance.PushDeviceToken = tokenID; -- Gitblit v1.8.0