西墨可视对讲
iOS更新,iOS17以上不显示TCP/UDP连接切换,启动时默认UDP切换,
IOS17以上linphone Sdk启动TCP连接时会导致APP闪退,无法捕抓异常,原生代码跑起来是线程崩溃
| | |
| | | |
| | | //登录sip服务器 |
| | | #if __IOS__ |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm,"UDP"); |
| | | string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion; |
| | | System.Version currentVersion = new System.Version(systemVersion); |
| | | System.Version version17 = new System.Version(17, 0); |
| | | if (currentVersion.CompareTo(version17) > 0) |
| | | { |
| | | HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, "udp"); |
| | | } |
| | | else |
| | | { |
| | | HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm, DB_ResidenceData.Instance.linphoneConnectType.ToString()); |
| | | } |
| | | #else |
| | | if (mInterphoneType == InterphoneType.FREEVIEW.ToString()) |
| | | { |
| | |
| | | }; |
| | | } |
| | | |
| | | public void LoadTopView_Linphone() |
| | | { |
| | | LoadTopView(); |
| | | |
| | | var btnSetting = new Button() |
| | | { |
| | | X = Application.GetRealWidth(337), |
| | | Y = Application.GetRealHeight(28 + maginY), |
| | | Width = Application.GetMinRealAverage(32), |
| | | Height = Application.GetMinRealAverage(32), |
| | | UnSelectedImagePath = "Public/FuncInfoSetIcon.png", |
| | | }; |
| | | contentView.AddChidren(btnSetting); |
| | | |
| | | btnSetting.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var infoView = new FunctionBaseInfoSetPage(); |
| | | MainPage.BasePageView.AddChidren(infoView); |
| | | infoView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | /// <summary> |
| | | /// 房间标题区域 |
| | | /// </summary> |
| | |
| | | actionRefresh = action; |
| | | } |
| | | |
| | | public FunctionBaseInfoSetPage() |
| | | { |
| | | bodyView = this; |
| | | |
| | | } |
| | | |
| | | public override void RemoveFromParent() |
| | | { |
| | | new System.Threading.Thread(() => |
| | |
| | | ScrollEnabled = false, |
| | | }; |
| | | bodyView.AddChidren(contentView); |
| | | //可视对讲 |
| | | if(function == null) |
| | | { |
| | | |
| | | //可视对讲 |
| | | if (function.spk == SPK.LinphoneXiMo) |
| | | { |
| | | var linphoneConnectView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | |
| | | |
| | | return; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | #region name view |
| | |
| | | |
| | | } |
| | | #endregion |
| | | #if stage2 |
| | | #region 添加到桌面 |
| | | var addToDesktopView = new FrameLayout() |
| | | { |
| | | Height = Application.GetRealHeight(55), |
| | | BackgroundColor = CSS_Color.MainBackgroundColor, |
| | | }; |
| | | contentView.AddChidren(addToDesktopView); |
| | | |
| | | var btnAddToDesktopText = new Button() |
| | | { |
| | | X = Application.GetRealWidth(16), |
| | | Width = Application.GetRealWidth(160), |
| | | TextAlignment = TextAlignment.CenterLeft, |
| | | TextColor = CSS_Color.FirstLevelTitleColor, |
| | | TextSize = CSS_FontSize.SubheadingFontSize, |
| | | TextID = StringId.AddToDesktop, |
| | | }; |
| | | addToDesktopView.AddChidren(btnAddToDesktopText); |
| | | |
| | | var btnAddToDesktopRight = new Button() |
| | | { |
| | | X = Application.GetRealWidth(339), |
| | | Gravity = Gravity.CenterVertical, |
| | | Width = Application.GetMinRealAverage(16), |
| | | Height = Application.GetMinRealAverage(16), |
| | | UnSelectedImagePath = "Public/RightIcon.png", |
| | | }; |
| | | addToDesktopView.AddChidren(btnAddToDesktopRight); |
| | | |
| | | #endregion |
| | | #endif |
| | | |
| | | if (function.spk == SPK.ElectricEnergy) |
| | | { |
| | |
| | | using System; |
| | | using System.Drawing.Printing; |
| | | using HDL_ON.Entity; |
| | | using HDL_ON.UI.Music; |
| | | using Shared; |
| | | |
| | |
| | | |
| | | btnSetting.MouseUpEventHandler = (sender, e) => |
| | | { |
| | | var infoView = new FunctionBaseInfoSetPage(); |
| | | var infoView = new FunctionBaseInfoSetPage(new Entity.Function() { spk = SPK.LinphoneXiMo }, () => { }); |
| | | MainPage.BasePageView.AddChidren(infoView); |
| | | infoView.LoadPage(); |
| | | MainPage.BasePageView.PageIndex = MainPage.BasePageView.ChildrenCount - 1; |
| | |
| | | #region 布局界面 |
| | | this.BackgroundColor = MusicColor.ViewColor; |
| | | var topView = new TopView(); |
| | | //this.AddChidren(topView.TopFLayoutView()); |
| | | |
| | | |
| | | |
| | | #if __IOS__ |
| | | // 获取当前系统的版本号 |
| | | string systemVersion = UIKit.UIDevice.CurrentDevice.SystemVersion; |
| | | // 将系统版本字符串转换为 Version 对象 |
| | | System.Version currentVersion = new System.Version(systemVersion); |
| | | // 定义 iOS 17 作为比较的版本 |
| | | System.Version version17 = new System.Version(17, 0); |
| | | // 比较当前版本是否大于 iOS 17 |
| | | if (currentVersion.CompareTo(version17) > 0) |
| | | { |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | //if (xiMoVideoList.Count > 0) |
| | | //{ |
| | | // this.AddChidren(topView.TopFLayoutView()); |
| | | //} |
| | | //else |
| | | //{ |
| | | // this.AddChidren(topView.TopFLayoutView2()); |
| | | //} |
| | | } |
| | | else |
| | | { |
| | | if (xiMoVideoList.Count > 0) |
| | | { |
| | | this.AddChidren(topView.TopFLayoutView2()); |
| | | } |
| | | else |
| | | { |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | } |
| | | topView.topNameBtn.TextID = StringId.keshiduijiang; |
| | | } |
| | | #else |
| | | if (xiMoVideoList.Count > 0) |
| | | { |
| | | this.AddChidren(topView.TopFLayoutView2()); |
| | | } |
| | | else |
| | | { |
| | | this.AddChidren(topView.TopFLayoutView()); |
| | | } |
| | | topView.topNameBtn.TextID = StringId.keshiduijiang; |
| | | #endif |
| | | |
| | | |
| | | var pageView = new PageLayout() |