wjc
2023-03-29 cf7623fe25a008b4e128c6083e362578e2a1e3b0
HDL_ON/Common/HDLCommon.cs
@@ -683,6 +683,7 @@
            {
                try
                {
                    var list = UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.GetVideoDoorLockLockModelsList();
                    //先获取萤石云子账号token
                    var result = new HttpServerRequest().EZGetChildToken();
                    if (result.Code == StateCode.SUCCESS)
@@ -694,7 +695,9 @@
                        {
                            if (!string.IsNullOrEmpty(ezChildAccessToken))
                            {
#if __IOS__
                                //iOS
                                //初始化萤石云SDK,中文国内key、英文海外key 开发者账号使用应用包名申请的APPKEY,不同包名应用需配置不同的APPKEY
                                EZSDK.IOS.EZSDK.SharedInstance().InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b");
@@ -703,12 +706,25 @@
                                EZSDK.IOS.EZSDK.SharedInstance().SetRequestHttpsHostAndPlatform(OnAppConfig.Instance.RequestHttpsHost, 1, DB_ResidenceData.Instance.CurrentRegion.id);
                                //2.设置萤石子账号的AccessToken到SDK
                                EZSDK.IOS.EZSDK.SharedInstance().SetEZAccessToken(ezChildAccessToken);
                                ////3.打开摄像头设备列表页面
                                EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor();
                                //////3.打开摄像头设备列表页面
                                //EZSDK.IOS.EZSDK.SharedInstance().Go2EZvizMonitor();
                                //EZSDK.IOS.EZDeviceInfo info = new EZSDK.IOS.EZDeviceInfo();
                                //info.de
                                //EZSDK.IOS.EZSDK.Play(info);
                                //2023年03月29日13:08:35 修改
                                Foundation.NSObject[] nSObject = new Foundation.NSObject[list.Count];
                                for (int i = 0; i < list.Count; i++)
                                {
                                    string strValue = list[i];
                                    nSObject[i] = new Foundation.NSString(strValue);
                                }
                                EZSDK.IOS.EZSDK.SharedInstance().ToEZDeviceListViewWithFilterTypes(nSObject);
#else
                                //Android
                                //1.设置所需河东的token、域名地址
@@ -720,21 +736,24 @@
                                    {
                                        ((BaseActivity)Shared.Application.Activity).SetPermission(result =>
                                        {
                                            if(result)
                                            {
                                            Android.Content.Intent intent = new Android.Content.Intent();
                                            var bundle = new Android.OS.Bundle();
                                            //传递name参数为tinyphp
                                            bundle.PutString("EzChildAccessToken", ezChildAccessToken);
                                            bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
                                            bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
                                            bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
                                            bundle.PutInt("Platform", 1);
                                            bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id);
                                            intent.PutExtras(bundle);
                                            intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
                                            Shared.Application.Activity.StartActivity(intent);
                                            }
                                            //2023年03月29日13:08:35 修改
                                            Com.Videogo.Hdl.HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id);
                                            Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list);
                                            //if (result)
                                            //{
                                            //    Android.Content.Intent intent = new Android.Content.Intent();
                                            //    var bundle = new Android.OS.Bundle();
                                            //    //传递name参数为tinyphp
                                            //    bundle.PutString("EzChildAccessToken", ezChildAccessToken);
                                            //    bundle.PutString("HdlToken", UserInfo.Current.LoginTokenString);
                                            //    bundle.PutString("Url", OnAppConfig.Instance.RequestHttpsHost);
                                            //    bundle.PutString("EzvizAppKey", "1aa98a90489b4838b966b57018b4b04b");
                                            //    bundle.PutInt("Platform", 1);
                                            //    bundle.PutString("HomeId", DB_ResidenceData.Instance.CurrentRegion.id);
                                            //    intent.PutExtras(bundle);
                                            //    intent.SetComponent(new Android.Content.ComponentName(Shared.Application.Activity, "com.videogo.MainActivity"));
                                            //    Shared.Application.Activity.StartActivity(intent);
                                            //}
                                        }, "android.permission.RECORD_AUDIO");
                                    }