From 5777c367f53c758546211d5f7f40a27f0b11c660 Mon Sep 17 00:00:00 2001 From: lss <lsc@hdlchina.com.cn> Date: 星期二, 26 四月 2022 18:02:03 +0800 Subject: [PATCH] 2022-4-26 --- ZigbeeApp/GateWay.Droid/Application.cs | 59 ++++++++++++++++++++--------------------------------------- 1 files changed, 20 insertions(+), 39 deletions(-) diff --git a/ZigbeeApp/GateWay.Droid/Application.cs b/ZigbeeApp/GateWay.Droid/Application.cs old mode 100755 new mode 100644 index 7858c42..3a13e7b --- a/ZigbeeApp/GateWay.Droid/Application.cs +++ b/ZigbeeApp/GateWay.Droid/Application.cs @@ -20,7 +20,6 @@ namespace com.hdl.home { - [Activity(Name = "com.hdl.home.wxapi.WXEntryActivity", Exported = true, Theme = "@android:style/Theme.Translucent", LaunchMode = Android.Content.PM.LaunchMode.SingleTask)] class WXEntryActivity : Android.App.Activity, IWXAPIEventHandler { @@ -83,6 +82,12 @@ public class Application : Android.App.Application { public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { } + + /// <summary> + /// 妫�娴嬪唴瀛樻硠闇茬殑涓滆タ + /// </summary> + //private Square.LeakCanary.RefWatcher _refWatcher; + public override void OnCreate() { //濡傛灉涓嶆槸App鐨勪富杩涚▼,鍒欎笉闇�瑕佸鐞� @@ -101,9 +106,16 @@ //璋冭瘯:璁板綍绯荤粺寮傚父 Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.SystemLogFile, ex.Message + "\r\n" + ex.StackTrace, true, false); } - base.OnCreate(); - // 閫氳繃WXAPIFactory宸ュ巶锛岃幏鍙朓WXAPI鐨勫疄渚� - //api = WXAPIFactory.CreateWXAPI(this, "wx2ec8f53f6fa36e82", true); + base.OnCreate(); + // 閫氳繃WXAPIFactory宸ュ巶锛岃幏鍙朓WXAPI鐨勫疄渚� + //api = WXAPIFactory.CreateWXAPI(this, "wx2ec8f53f6fa36e82", true); + + //妫�娴嬪唴瀛樻硠闇茬殑涓滆タ + //if (Square.LeakCanary.LeakCanaryXamarin.IsInAnalyzerProcess(this) == false) + //{ + // _refWatcher = Square.LeakCanary.LeakCanaryXamarin.Install(this); + // _refWatcher.Watch(this); + //} // 灏嗗簲鐢ㄧ殑appId娉ㄥ唽鍒板井淇� api?.RegisterApp("wx2ec8f53f6fa36e82"); @@ -136,12 +148,14 @@ var req = new SendAuth.Req { Scope = "snsapi_userinfo", State = "ZigbeeApp" }; api?.SendReq(req); } + /// <summary> /// 鎵�鏈夊垵濮嬪寲鍏ㄩ儴鍦ㄨ繖涓柟娉曞疄鐜� /// </summary> void initAll() { - Shared.Application.IsGpsEnable = System.IO.File.Exists(Shared.Phone.UserCenter.DirNameResourse.OpenGbsFile); + //鍙栨秷灞忓箷甯镐寒 + BaseActivity.KeepScreenON = false; //闅愯棌搴曢儴杞寜閿� BaseActivity.IsHideVirualButtons = true; @@ -462,40 +476,7 @@ /// <param name="hiddenJson">浜戠鎺ㄨ繃鏉ョ殑鏁版嵁</param> private void VideoMethod(string hiddenJson) { - var hiddanJson = Newtonsoft.Json.Linq.JObject.Parse(hiddenJson); - if (hiddanJson == null) - { - return; - } - var json = Newtonsoft.Json.Linq.JObject.Parse(hiddanJson["HiddanJson"].ToString()); - if (json == null) - { - return; - } - Shared.Phone.VideoPhone.ESVideoInfo eSVideoInfo = new Shared.Phone.VideoPhone.ESVideoInfo(); - if (json["uuid"].ToString().Contains(",")) - { - var uuid = json["uuid"].ToString().Split(','); - eSVideoInfo.ESVideoUUID = uuid[0]; - - } - else - { - eSVideoInfo.ESVideoUUID = json["uuid"].ToString(); - } - - eSVideoInfo.DeviceName = Language.StringByID(Shared.R.MyInternationalizationString.theOutdoorUnit); - eSVideoInfo.ESRoomID = int.Parse(json["roomno"].ToString()); - if (!string.IsNullOrEmpty(json["unitno"].ToString())) - { - string str = json["unitno"].ToString(); - string str1 = str.Substring(0, 2).TrimStart('0'); - string str2 = str.Substring(2, 2).TrimStart('0'); - eSVideoInfo.RoomName = str1 + Language.StringByID(Shared.R.MyInternationalizationString.dong) + str2 + Language.StringByID(Shared.R.MyInternationalizationString.unit); - } - - Shared.Phone.VideoPhone.ESVideo.ShowESvideoVideoIntercom(eSVideoInfo); - + Com.Evoyohome.Sphonelibs.Global.Global.OpenCallActivity(null); } } } -- Gitblit v1.8.0