From 31e484e5d3e42e825e43ef9d1707c1adc02a4e1c Mon Sep 17 00:00:00 2001
From: 黄学彪 <hxb@hdlchina.com.cn>
Date: 星期五, 18 十二月 2020 19:57:34 +0800
Subject: [PATCH] 完成 dali 的 UI
---
HDL-ON_Android/Application.cs | 31 +++++++++++++++++++------------
1 files changed, 19 insertions(+), 12 deletions(-)
diff --git a/HDL-ON_Android/Application.cs b/HDL-ON_Android/Application.cs
index 41c3685..f676103 100644
--- a/HDL-ON_Android/Application.cs
+++ b/HDL-ON_Android/Application.cs
@@ -49,7 +49,9 @@
string[] permissions = new string[] { Manifest.Permission.WriteExternalStorage, Manifest.Permission.RecordAudio,
Manifest.Permission.Camera, Manifest.Permission.ProcessOutgoingCalls, Manifest.Permission.GetAccounts};
-
+ //绂佹灞忓箷闀夸寒
+ BaseActivity.KeepScreenON = false;
+ //闅愯棌杩嫓铏氭嫙鎸夐敭
BaseActivity.IsHideVirualButtons = true;
init();
BaseActivity.OnCreateActoin += (activity, application) =>
@@ -92,15 +94,16 @@
BaseActivity.OnResumeAction += (activity) =>
{
checkSomeInfo();
- new HDL_ON.UI.AppUnlockPage().LoadPage();
+
};
BaseActivity.OnDestroyAction += (activity) =>
{
Console.WriteLine("OnDestroyAction");
//BusSocket.Stop();
- OnAppConfig.Instance.unlockTime = DateTime.Now;
+ //UserInfo.Current.unlockTime = DateTime.Now;
};
+
HDLUtils.SetAuthoritiesName("com.hdl.onpro.fileProvider");
@@ -136,11 +139,11 @@
//淇濆瓨鑾峰彇鐨勬瀬鍏夋湇鍔″櫒涓婄殑娉ㄥ唽ID鍒版湰鍦版枃浠�
var tokenID = JPushInterface.GetRegistrationID(activity);
Console.WriteLine("RegistrationID: " + tokenID);
- if (!string.IsNullOrEmpty(tokenID) && UserInfo.Current.PushDeviceToken != tokenID)
+ if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
{
- UserInfo.Current.PushDeviceToken = tokenID;
- UserInfo.Current.PhoneName = Android.OS.Build.Manufacturer;
- UserInfo.Current.SaveUserInfo();
+ OnAppConfig.Instance.PushDeviceToken = tokenID;
+ OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
+ OnAppConfig.Instance.SaveConfig();
}
int loadTokenCount = 0;
System.Threading.Tasks.Task.Run(() =>
@@ -157,11 +160,11 @@
}
}
Console.WriteLine("RegistrationID: " + tokenID);
- if (!string.IsNullOrEmpty(tokenID) && UserInfo.Current.PushDeviceToken != tokenID)
+ if (!string.IsNullOrEmpty(tokenID) && OnAppConfig.Instance.PushDeviceToken != tokenID)
{
- UserInfo.Current.PushDeviceToken = tokenID;
- UserInfo.Current.PhoneName = Android.OS.Build.Manufacturer;
- UserInfo.Current.SaveUserInfo();
+ OnAppConfig.Instance.PushDeviceToken = tokenID;
+ OnAppConfig.Instance.PhoneName = Android.OS.Build.Manufacturer;
+ OnAppConfig.Instance.SaveConfig();
}
});
@@ -273,6 +276,8 @@
{
Console.WriteLine("HHH OnActivityStarted锛歠oreground");
BusSocketStart();
+ //鍚庡彴鍥炲埌鍓嶅彴
+ new HDL_ON.UI.AppUnlockPage().LoadPage();
}
}
@@ -284,6 +289,9 @@
{
Console.WriteLine("HHH OnActivityStopped锛� background");
BusSocketStop();
+ //杩涘叆鍚庡彴
+ UserInfo.Current.unlockTime = DateTime.Now;
+
}
}
@@ -308,7 +316,6 @@
{
IsEnterBackground = true;
//BusSocket.Stop();
- OnAppConfig.Instance.unlockTime = DateTime.Now;
}
--
Gitblit v1.8.0