| | |
| | | |
| | | } |
| | | |
| | | #region --------- 跳转到Android那边的方法(萤石视频门锁) -------- |
| | | #region --------- 跳转到Android,ios那边的方法(萤石视频门锁) -------- |
| | | /// <summary> |
| | | /// android,ios源生添加设备到云端成功后回调方法 |
| | | /// 再读取云端的上萤石设备列表 |
| | |
| | | this.ShowTip("先获取萤石云子账号token失败。"); |
| | | } |
| | | #if __IOS__ |
| | | //跳转添加萤石设备 |
| | | ezsdkDelegate = new IosIHdlInterface(); |
| | | ezsdkDelegate.mAction += (serials) => { |
| | | var list = VideDoorLockSend.Current.GetVideoDoorLockDeviceList(SPK.VideoDoorLock); |
| | | if (list.Count > 0) |
| | | { |
| | | var function = list.Find((o) => o.sid == serials); |
| | | if (function != null) |
| | | { |
| | | this.SaveFunctionFile(function); |
| | | } |
| | | } |
| | | }; |
| | | EZSDK.IOS.EZSDK.SharedInstance().Delegate= ezsdkDelegate; |
| | | EZSDK.IOS.EZSDK.SharedInstance().AddEzvizMonitorWithDeviceType(spk); |
| | | |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZScanActivity(Application.Activity,spk); |
| | |
| | | { |
| | | dialog.Close(); |
| | | #if __IOS__ |
| | | |
| | | //打开萤石视频界面 |
| | | EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk); |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); |
| | | #endif |
| | |
| | | else |
| | | { |
| | | #if __IOS__ |
| | | //打开萤石视频界面 |
| | | EZSDK.IOS.EZSDK.SharedInstance().PlayWithDeviceSerial(deviceSerial, deviceId, spk); |
| | | |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpToEZRealPlayActivity(Application.Activity,deviceId,deviceSerial,spk); |
| | | #endif |
| | |
| | | { |
| | | |
| | | #if __IOS__ |
| | | //打开萤石历史记录界面 |
| | | EZSDK.IOS.EZSDK.SharedInstance().ToDeviceMsgListView(deviceId); |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpLockHistoryActivity(Application.Activity, deviceId); |
| | | #endif |
| | | |
| | | }); |
| | | //未实现 |
| | | //this.InitializationAndroidData(); |
| | | // |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 临时密码开门 |
| | |
| | | /// </summary> |
| | | public void SkipPSWActivity(string deviceId) |
| | | { |
| | | |
| | | this.InitializationAndroidData((isBools) => |
| | | { |
| | | if (!isBools) |
| | |
| | | }); |
| | | } |
| | | #if __IOS__ |
| | | //打开萤石临时密码界面 |
| | | EZSDK.IOS.EZSDK.SharedInstance().ToTemPassView(deviceId); |
| | | #else |
| | | HDLEzvizSdk.Instance.JumpTempPasswordActivity(Application.Activity, deviceId); |
| | | #endif |
| | |
| | | /// <param name="home">对象</param> |
| | | public void ChangeCurrHome(RegionInfoRes home) |
| | | { |
| | | |
| | | if (DB_ResidenceData.Instance.CurrentRegion.id == home.id || string.IsNullOrEmpty(home.id)) return; |
| | | #if __IOS__ |
| | | #else |
| | | HDLEzvizSdk.Instance.SetHomeId(home.id); |
| | | #endif |
| | | |
| | | } |
| | | #endregion |
| | |
| | | } |
| | | |
| | | #if __IOS__ |
| | | ///// <summary> |
| | | ///// 专门定义给Ios回调用着,没有特殊含义 |
| | | ///// </summary> |
| | | //public class IosIHdlInterface : Shared.IOS.HDLLinphoneSDK.HDLLinphoneCallDelegate |
| | | //{ |
| | | |
| | | // Action<bool, string> mAction; |
| | | // public IosIHdlInterface(Action<bool, string> action) |
| | | // { |
| | | // mAction = action; |
| | | // } |
| | | // /// <summary> |
| | | // /// |
| | | // /// </summary> |
| | | // /// <param name="p0">true是入网成功(源生回调返回)</param> |
| | | // /// <param name="p1">设备的序列化(源生回调返回)</param> |
| | | // public void AddCallback(bool p0, string p1) |
| | | // { |
| | | // mAction?.Invoke(p0, p1); |
| | | // } |
| | | |
| | | |
| | | //} |
| | | IosIHdlInterface ezsdkDelegate; |
| | | /// <summary> |
| | | /// 专门定义给Ios回调用着,没有特殊含义 |
| | | /// </summary> |
| | | public class IosIHdlInterface : EZSDK.IOS.EZSDKDelegate |
| | | { |
| | | public Action<string> mAction; |
| | | public IosIHdlInterface() |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="p0">true是入网成功(源生回调返回)</param> |
| | | /// <param name="p1">设备的序列化(源生回调返回)</param> |
| | | public override void AddDeviceSuccessed(string deviceSerial) |
| | | { |
| | | mAction?.Invoke(deviceSerial); |
| | | } |
| | | } |
| | | #else |
| | | /// <summary> |
| | | /// 专门定义给安卓回调用着,没有特殊含义 |