old mode 100755
new mode 100644
| | |
| | | /// <summary>
|
| | | /// 检测内存泄露的东西
|
| | | /// </summary> |
| | | ///private Square.LeakCanary.RefWatcher _refWatcher;
|
| | | //private Square.LeakCanary.RefWatcher _refWatcher;
|
| | |
|
| | | public override void OnCreate()
|
| | | { |
| | |
| | | catch (Exception ex)
|
| | | {
|
| | | //调试:记录系统异常
|
| | | Shared.Phone.HdlLogLogic.Current.WriteOtherText(Shared.Phone.HdlFileNameResourse.LogDirectory, ex.Message + "\r\n" + ex.StackTrace, true, false);
|
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.SystemLogFile, ex.Message + "\r\n" + ex.StackTrace, true, false);
|
| | | }
|
| | | base.OnCreate();
|
| | | // 通过WXAPIFactory工厂,获取IWXAPI的实例
|
| | |
| | | { |
| | | try |
| | | { |
| | | if (Shared.Common.Config.Instance.BackKeyCanClick == false) |
| | | if (Shared.Common.CommonPage.BackKeyCanClick == false) |
| | | { |
| | | //不允许按返回键 |
| | | return; |
| | |
| | | { |
| | | Shared.Application.FontSize = 12; |
| | | AppCenter.Start("4802834a-e7e9-4dd8-93f1-c2f88f0bd464", typeof(Analytics), typeof(Crashes));
|
| | | #if DEBUG
|
| | | //测试ID,瞎写的
|
| | | Shared.Common.Config.Instance.RegistrationID = "93f1c2f88f0bd464";
|
| | | #endif
|
| | | #if Release
|
| | | //保存获取的极光服务器上的注册ID到本地文件
|
| | | var registrationId = JPushInterface.GetRegistrationID(activity); |
| | | #if Release |
| | | //保存获取的极光服务器上的注册ID到本地文件 |
| | | var registrationId = JPushInterface.GetRegistrationID(activity); |
| | | System.Console.WriteLine("registrationId-极光id=" + registrationId); |
| | | if (!string.IsNullOrEmpty(registrationId))
|
| | | {
|
| | | Shared.Common.Config.Instance.RegistrationID = registrationId;
|
| | | Shared.Common.Config.Instance.Save();
|
| | | }
|
| | | //调试:记录极光ID
|
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true); |
| | | if (!string.IsNullOrEmpty(registrationId)) |
| | | { |
| | | Shared.Common.Config.Instance.RegistrationID = registrationId; |
| | | Shared.Common.Config.Instance.Save(); |
| | | } |
| | | //调试:记录极光ID |
| | | Shared.Phone.UserCenter.HdlLogLogic.Current.WriteOtherText(Shared.Phone.UserCenter.DirNameResourse.JiguangFile, "receive1:" + registrationId, true, true); |
| | | #endif |
| | | };
|
| | | BaseActivity.RefreshUIAction += (activity) =>
|
| | |
| | | if (!string.IsNullOrEmpty(regId))
|
| | | {
|
| | | Shared.Common.Config.Instance.RegistrationID = regId;
|
| | | Shared.Common.Config.Instance.Save();
|
| | | }
|
| | | #if Release
|
| | | //调试:记录极光ID
|
| | |
| | | System.Console.WriteLine(TAG, "extras : " + extras);
|
| | |
|
| | | //处理极光消息推送的逻辑函数
|
| | | Shared.Phone.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras); |
| | | Shared.Phone.UserCenter.HdlJiguangMsgPushLogic.Current.AdjustJiguangMsgPush(title, message, extras); |
| | | } |
| | | /// <summary> |
| | | /// 打开消息显示界面 |
| | |
| | | /// <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);
|
| | | } |
| | | } |
| | | } |