From a251442d9fc088b3d8cf74d20b959f0f6103b095 Mon Sep 17 00:00:00 2001
From: wxr <464027401@qq.com>
Date: 星期一, 14 九月 2020 17:42:10 +0800
Subject: [PATCH] 20200914
---
HDL-ON_Android/Application.cs | 49 ++++++++++++++++++++++++++++++++++---------------
1 files changed, 34 insertions(+), 15 deletions(-)
diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index dec8545..52ae5fa 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -1,4 +1,5 @@
锘縰sing System;
+using System.Net;
using Android;
using Android.Content;
using Android.Net;
@@ -35,32 +36,37 @@
base.OnCreate();
initAll();
+
}
/// <summary>
/// 鎵�鏈夊垵濮嬪寲鍏ㄩ儴鍦ㄨ繖涓柟娉曞疄鐜�
/// </summary>
void initAll()
{
- //Locale locale1 = Locale.Default;
- //var localeList = Resources.Configuration.Locale;
- //if (localeList.Language == "zh")
- //{
- // Language.CurrentLanguage = "Chinese";
- //}
-
+
string[] permissions = new string[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.RecordAudio,
Manifest.Permission.Camera, Manifest.Permission.ProcessOutgoingCalls, Manifest.Permission.GetAccounts};
- var version = Build.VERSION.SdkInt + "";
- Console.WriteLine("Build.VERSION.SdkInt : " + version);
-
- //Android.Support.V4.App.ActivityCompat.RequestPermissions (BaseActivity., permissions, 321);
-
BaseActivity.IsHideVirualButtons = true;
init();
- BaseActivity.OnCreateActoin += (activity, application) => {
+ BaseActivity.OnCreateActoin += (activity, application) =>
+ {
+ Language.CurrentLanguage = "Chinese";
+ Locale locale1 = Locale.Default;
+ var localeList = Resources.Configuration.Locale;
+ if (localeList.Language == "zh")
+ {
+ Language.CurrentLanguage = "Chinese";
+ }
- BaseActivity.NetworkStateChanged += (int obj) => {
+ BaseActivity.NetworkStateChanged += (int obj) =>
+ {
+ BusSocket.Stop();
+ new System.Threading.Thread(() => {
+ System.Threading.Thread.Sleep(1000);
+ BusSocket.Start(6000);
+ })
+ { IsBackground = true }.Start();
};
};
@@ -70,6 +76,7 @@
};
BaseActivity.OnResumeAction += (activity) => {
checkSomeInfo();
+ new HDL_ON.UI.AppUnlockPage().LoadPage();
};
BaseActivity.OnDestroyAction += (activity) => {
Console.WriteLine("OnDestroyAction");
@@ -77,12 +84,24 @@
};
HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
+
+ //Shared.Application.IsGpsEnable = true;
+
+ Shared.Application.LocationAction = (arg1, arg2) => {
+ Shared.Application.LocationAction = null;
+
+ new HDL_ON.DAL.Server.HttpServerRequest().GetCityInfo(arg1.ToString(), arg2.ToString());
+
+ MainPage.Log($"缁忕含搴�:::{arg1}:{arg2}");
+
+ };
+
+
}
public static bool IsShowTip = true;
void init()
{
//鎵嬫満鍚嶇О Android.OS.Build.Manufacturer;
-
}
void checkSomeInfo()
{
--
Gitblit v1.8.0