wjc
2023-04-13 02a194a40228251fef82dbca6c7687263b55b0b9
2023年04月13日14:33:48

解决了android关掉,通过消息栏打开不到app问题;萤石门锁自动化配置输入条件改成用用户名称(之前是用户id)。
8个文件已修改
96 ■■■■■ 已修改文件
HDL-ON_Android/Application.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Other/JPush/JPushReceiver.cs 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/SplashActivity.cs 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_iOS/AppDelegate.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/Common/HDLCommon.cs 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
HDL-ON_Android/Application.cs
@@ -38,6 +38,10 @@
        public Application(IntPtr handle, Android.Runtime.JniHandleOwnership ownerShip) : base(handle, ownerShip) { }
        public override void OnCreate()
        {
            if (Shared.Application.Activity != null)
            {
                //reStartApp(this);
HDL-ON_Android/Other/JPush/JPushReceiver.cs
@@ -34,6 +34,8 @@
        /// <param name="notificationMessage"></param>
        public override void OnNotifyMessageOpened(Context context, NotificationMessage notificationMessage)
        {
            //2020-12-23 解决点击通知栏打开不了APP问题
            //base.OnNotifyMessageOpened(context, notificationMessage);
            OpenNotification(context, notificationMessage);
@@ -146,9 +148,18 @@
                Utlis.WriteLine("PushMes extras : " + pushMes.Extras);
                Utlis.WriteLine("PushMes HomeId : " + pushMes.HomeId);
                Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                i.SetFlags(ActivityFlags.NewTask);
                context.StartActivity(i);
                if (Shared.Application.Activity==null)
                {
                    Intent i = new Intent(context, typeof(SplashActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                    i.SetFlags(ActivityFlags.NewTask);
                    context.StartActivity(i);
                }
                else
                {
                    Intent i = new Intent(context, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
                    i.SetFlags(ActivityFlags.NewTask);
                    context.StartActivity(i);
                }
                //解析msg
                AdjustPushMessage(pushMes);
            }
@@ -160,7 +171,6 @@
        public static void AdjustPushMessage(JPushMessageInfo pushMes)
        {
            new System.Threading.Thread(new System.Threading.ThreadStart(() =>
            {
                while (MainPage.BasePageView == null)
HDL-ON_Android/SplashActivity.cs
@@ -16,7 +16,7 @@
namespace HDL_ON_Android
{
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, Name = "com.hdl.onpro.SplashActivity",ScreenOrientation = ScreenOrientation.Portrait) ]
    [Activity(Theme = "@style/SplashTheme", MainLauncher = true, LaunchMode = LaunchMode.SingleTask, Name = "com.hdl.onpro.SplashActivity", ScreenOrientation = ScreenOrientation.Portrait)]
    [IntentFilter(new string[] { "com.hdl.onpro.SplashActivity", Intent.ActionView })]
    public class SplashActivity : Activity
    {
@@ -46,21 +46,16 @@
        {
            base.OnCreate(savedInstanceState);
            //Intent i = new Intent(this, typeof(BaseActivity));//Intent intent=new Intent( 起始组件对象 , 目标 Service.class);
            //StartActivityForResult(i, 1);
            //OverridePendingTransition(0, 0);
            //initAll();
            if (HDL_ON.OnAppConfig.Instance.FirstRunApp || !HDL_ON.OnAppConfig.Instance.isAgreePrivacyPolicy)
            {
                Language.CurrentLanguage = "Chinese";
                Locale locale1 = Locale.Default;
                var localeList = Resources.Configuration.Locale;
                Console.WriteLine("当前语言缩写:"+localeList.Language);
                Console.WriteLine("当前语言缩写:" + localeList.Language);
                if (localeList.Language == "zh")
                {
                    Language.CurrentLanguage = "Chinese";
@@ -83,7 +78,7 @@
                }
                Intent intent = new Intent(this, typeof(AgreementActivity));
                StartActivityForResult(intent,99);
                StartActivityForResult(intent, 99);
            }
            else
            {
@@ -95,7 +90,6 @@
                initOhterSdk();
                Finish();//关闭自己
            }
        }
        void initOhterSdk()
@@ -170,12 +164,12 @@
                Language.CurrentLanguage = "Chinese";
                Locale locale1 = Locale.Default;
                var localeList = Resources.Configuration.Locale;
                Console.WriteLine("当前语言编号"+ localeList.Language);
                Console.WriteLine("当前语言编号" + localeList.Language);
                if (localeList.Language == "zh")
                {
                    Language.CurrentLanguage = "Chinese";
                }
                else if(localeList.Language == "es")
                else if (localeList.Language == "es")
                {
                    Language.CurrentLanguage = "Spanish";
                }
@@ -207,7 +201,7 @@
                    //}
                    //else
                    //{
                        //Console.WriteLine("HHH 网络变化但处于后台"+internetStatus);
                    //Console.WriteLine("HHH 网络变化但处于后台"+internetStatus);
                    //}
                    //网络变化处理
@@ -333,7 +327,7 @@
        }
        public static bool IsShowTip = true;
        void checkSomeInfo()
        {
            try
@@ -390,9 +384,8 @@
            return false;
        }
    }
}
HDL-ON_iOS/AppDelegate.cs
@@ -397,7 +397,7 @@
                        UserInfo.Current.pushMessageInfo = pushMes;
                        UserInfo.Current.inCall = DateTime.Now;
                    }
                    if (bFinishedLaunching)
                    {
                        if (pushMes.Extras != null)
HDL_ON/Common/HDLCommon.cs
@@ -258,6 +258,8 @@
        {
            try
            {
                //Extras为空不处理
                if (string.IsNullOrEmpty(jpushMessageInfo.Extras)) return;
HDL_ON/UI/UI2/3-Intelligence/Automation/ConditionDeviceFunList.cs
@@ -1142,7 +1142,7 @@
                    {
                        loading.Hide();
                        string stateValue = btnState.Tag == null ? "" : btnState.Tag.ToString();
                        string stateValue = btnState.Text == null ? "" : btnState.Text.ToString();
                        PublicInterface publicInterface = new PublicInterface();
                        publicInterface.MultiSelectShow(this, faceIdList, device.name, stateValue, (indexeList) =>
                        {
@@ -1158,8 +1158,9 @@
                                        continue;
                                    }
                                    var face = faceIdList[indexe];
                                    //数据封装
                                    AddDictionary("open_user", face.userId, "string");
                                    //数据封装<高胜说萤石那边是推送用户名>
                                    AddDictionary("open_user", face.userName, "string");
                                    s += face.userName;
                                    s += ",";
                                    tag += face.userId;
HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -414,12 +414,15 @@
                                        for (int b = 0; b < dicList.Count; b++)
                                        {
                                            var dic = dicList[b];
                                            var userId = dic["value"].ToString();
                                            var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
                                            s += FaceItem.userName;
                                            //var userId = dic["value"].ToString();
                                            //var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
                                            //s += FaceItem.userName;
                                            //s += ",";
                                            //tag += FaceItem.userId;
                                            //tag += "_";
                                            var userName = dic["value"].ToString();
                                            s += userName;
                                            s += ",";
                                            tag += FaceItem.userId;
                                            tag += "_";
                                        }
                                        inputView.btnState.Text = s;
                                    }
@@ -445,10 +448,10 @@
                                                var FaceItem = this.GetFaceItem(userId, device.deviceId);
                                                s += FaceItem.userName;
                                                s += ",";
                                            }
                                            //string userId = this.GetKeyValue("user_id",dicList);
                                            //var FaceItem = this.GetFaceItem(userId, device.deviceId);
                                            //inputView.btnState.Text = FaceItem.userName;
                                        }
                                        inputView.btnState.Text = s;
                                    }
@@ -2170,12 +2173,15 @@
                        for (int b = 0; b < dicList.Count; b++)
                        {
                            var dic = dicList[b];
                            var userId = dic["value"].ToString();
                            var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
                            s += FaceItem.userName;
                            //var userId = dic["value"].ToString();
                            //var FaceItem = this.GetVideoDoorLockUserItem(userId, device);
                            //s += FaceItem.userName;
                            //s += ",";
                            //tag += FaceItem.userId;
                            //tag += "_";
                            var userName = dic["value"].ToString();
                            s += userName;
                            s += ",";
                            tag += FaceItem.userId;
                            tag += "_";
                        }
                        button1.Text = s;
                        button1.Tag = tag;
HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -234,10 +234,10 @@
                        }
                        string appKey = "1aa98a90489b4838b966b57018b4b04b";//正式服务器
                        if (OnAppConfig.Instance.RequestHttpsHost == "https://test-gz.hdlcontrol.com")
                        {
                            appKey = "941b1b72b6294998acfd36c14931b675";//用在测试服务器推送的
                        }
                        //if (OnAppConfig.Instance.RequestHttpsHost == "https://test-gz.hdlcontrol.com")
                        //{
                        //    appKey = "941b1b72b6294998acfd36c14931b675";//用在测试服务器推送的
                        //}
#if __IOS__