| | |
| | | using HDL_ON; |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | |
| | | #if __Android__ |
| | | using Android.App; |
| | | using Android.Content; |
| | |
| | | using Com.Hdl.Hdllinphonesdk; |
| | | #else |
| | | using Foundation; |
| | | using UIKit; |
| | | using Shared.IOS.HDLLinphoneSDK; |
| | | #endif |
| | | |
| | | namespace Shared |
| | | { |
| | | /// <summary> |
| | | /// 目前是每个住宅对应一个SIP账号,切换住宅需要重新获取SIP账号 |
| | | /// </summary> |
| | | public class HDLLinphone |
| | | { |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public HDLLinphone() |
| | | { |
| | | //判断有没有初始化SDK,没初始化过初始化一次 |
| | | InitLinphone(); |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 当前住宅是否支持可视对讲 |
| | | /// </summary> |
| | | public bool IsEnable = false; |
| | | /// <summary> |
| | | /// 是否自动跳转呼叫页面, |
| | | /// false:收到推送并且已经收到sip呼叫才跳转呼叫页面 |
| | | /// true:原生收到呼叫马上跳转呼叫页面,不等待推送过来 |
| | | /// </summary> |
| | | bool IsAutoJumpCallView = false; |
| | | /// <summary> |
| | | /// 是否初始化了SDK |
| | | /// </summary> |
| | | bool IsInitSdk; |
| | | /// <summary> |
| | | /// 当前登录的Sip账号 |
| | | /// </summary> |
| | | HDLSipInfo currentHDLSipInfo; |
| | | /// <summary> |
| | | /// 可视对讲设备参数 |
| | | /// </summary> |
| | | HDLCallVideoInfo mHDLCallVideoInfo; |
| | | |
| | | #region ■ -- 初始化SDK_______________________________ |
| | | /// <summary> |
| | | /// 初始化SDK |
| | |
| | | void InitLinphone() |
| | | { |
| | | //防止重复初始化 |
| | | if (isInitSdk) return; |
| | | if (IsInitSdk) return; |
| | | |
| | | isInitSdk = true; |
| | | IsInitSdk = true; |
| | | |
| | | #if __IOS__ |
| | | |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().InitalLinPhone(); |
| | | //设置收到来电后、是否需自动跳转呼叫页面方案 |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().IsAutoJumpCallView = IsAutoJumpCallView; |
| | | //设置Listener监听 |
| | | mOnHDLLinphoneCallDelegate = new OnHDLLinphoneCallDelegate(this); |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().HdlLinphoneCallDelegate = mOnHDLLinphoneCallDelegate; |
| | | #else |
| | | Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.InitLinphone(Application.Activity); |
| | | HDLLinphoneKit.Instance.InitLinphone(Application.Activity); |
| | | //设置收到来电后、是否需自动跳转呼叫页面方案 |
| | | HDLLinphoneKit.Instance.AutoJumpCallView = IsAutoJumpCallView; |
| | | //设置Listener监听 |
| | | setOnHDLLinphoneCallListener(); |
| | | #endif |
| | | |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 当前登录的Sip账号 |
| | | /// </summary> |
| | | HDLSipInfo currentHDLSipInfo; |
| | | |
| | | /// <summary> |
| | | /// 设置sip登录账号 |
| | | /// </summary> |
| | | /// <param name="mHDLSipInfo"></param> |
| | | public void SetAccountAndLogin(HDLSipInfo mHDLSipInfo) { |
| | | public void SetAccountAndLogin(HDLSipInfo mHDLSipInfo) |
| | | { |
| | | |
| | | this.currentHDLSipInfo = mHDLSipInfo; |
| | | |
| | | if (mHDLSipInfo == null) return; |
| | | |
| | | |
| | | #if __IOS__ |
| | | //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("3333", "85521566", "116.62.26.215:5060"); |
| | | //Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login("6666", "85521566", "116.62.26.215:5060"); |
| | | Shared.IOS.HDLLinphoneSDK.HDLLinPhoneSDK.Instance().Login(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); |
| | | #else |
| | | Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.SetAccountAndLogin(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); |
| | | //Com.Hdl.Hdllinphonesdk.Core.EasyLinphone.SetAccountAndLogin("61723164995710", "8ec02ce0", "47.94.42.230:25060"); |
| | | HDLLinphoneKit.Instance.SetAccountAndLogin(mHDLSipInfo.sipAccount, mHDLSipInfo.sipPasswd, mHDLSipInfo.realm); |
| | | #endif |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 注销所有账号 |
| | | /// </summary> |
| | | public void LogoutAllAccount() { |
| | | //没初始化过则返回 |
| | | if (!IsInitSdk) return; |
| | | |
| | | this.currentHDLSipInfo = null; |
| | | this.mHDLCallVideoInfo = null; |
| | | #if __IOS__ |
| | | |
| | | HDLLinPhoneSDK.Instance().LogoutAllLinphoneUser(); |
| | | #else |
| | | HDLLinphoneKit.Instance.Logout(); |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清除配置表 |
| | | /// </summary> |
| | | public void ClearProxyConfig() |
| | | { |
| | | #if __IOS__ |
| | | |
| | | HDLLinPhoneSDK.Instance().ClearAllConfigs(); |
| | | #else |
| | | HDLLinphoneKit.Instance.ClearProxyConfig(); |
| | | #endif |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region ■ -- 获取sip账号_______________________________ |
| | | /// <summary> |
| | | /// 获取当前住宅的SIP账号 |
| | | /// </summary> |
| | | public HDLSipInfo GetHDLSipInfo(string homeId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", homeId); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var resultObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_VideoDevice_GetSipAccount, requestJson); |
| | | |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | if (string.IsNullOrEmpty(resultObj.Data.ToString())) |
| | | { |
| | | //控的话代表当前住宅不支持 |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<HDLSipInfo>(resultObj.Data.ToString()); |
| | | return info; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 请求服务器获取当前住宅Sip账号信息并初始化LinphoneSDK和登录 |
| | | /// </summary> |
| | | /// <param name="homeId"></param> |
| | | public void GetHDLSipInfoAndInitSDK(string homeId) |
| | | { |
| | | try |
| | | { |
| | | //先清空呼叫和监视设备信息 |
| | | InitCallInfo(null); |
| | | HDLSipInfo mHDLSipInfo = GetHDLSipInfo(homeId); |
| | | if (mHDLSipInfo != null) |
| | | { |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | InitLinphone(); |
| | | mHDLSipInfo.homeId = homeId; |
| | | SetAccountAndLogin(mHDLSipInfo); |
| | | Utlis.WriteLine("CALL 获取SIP账号成功:" + mHDLSipInfo.sipAccount); |
| | | }); |
| | | } |
| | | } |
| | | catch { } |
| | | |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ -- 动作回调和原生交互,提交记录到云端_______________________________ |
| | | /// <summary> |
| | | /// 可视对讲设备参数 |
| | | /// </summary> |
| | | public HDLCallVideoInfo mHDLCallVideoInfo; |
| | | |
| | | #region ■ -- 动作回调和原生交互,提交记录到云端_______________________________ |
| | | |
| | | /// <summary> |
| | | /// 初始化呼叫参数 |
| | | /// </summary> |
| | |
| | | |
| | | } |
| | | |
| | | DateTime UnlockDateTime = DateTime.MinValue; |
| | | //DateTime UnlockDateTime = DateTime.MinValue; |
| | | #endregion |
| | | |
| | | #region ■ -- 新接听和开锁接口_______________________________ |
| | |
| | | } |
| | | #endregion |
| | | |
| | | #region ■ -- 获取sip账号_______________________________ |
| | | /// <summary> |
| | | /// 是否初始化了SDK |
| | | /// </summary> |
| | | public bool isInitSdk; |
| | | /// <summary> |
| | | /// 获取当前住宅的SIP账号 |
| | | /// </summary> |
| | | public HDLSipInfo GetHDLSipInfo(string homeId) |
| | | { |
| | | Dictionary<string, object> d = new Dictionary<string, object>(); |
| | | d.Add("homeId", homeId); |
| | | |
| | | var requestJson = HttpUtil.GetSignRequestJson(d); |
| | | var resultObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_VideoDevice_GetSipAccount, requestJson); |
| | | |
| | | if (resultObj.Code == StateCode.SUCCESS) |
| | | { |
| | | if (string.IsNullOrEmpty(resultObj.Data.ToString())) |
| | | { |
| | | //控的话代表当前住宅不支持 |
| | | return null; |
| | | } |
| | | else |
| | | { |
| | | var info = Newtonsoft.Json.JsonConvert.DeserializeObject<HDLSipInfo>(resultObj.Data.ToString()); |
| | | return info; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 获取当前住宅Sip账号信息并初始化LinphoneSDK和登录 |
| | | /// </summary> |
| | | /// <param name="homeId"></param> |
| | | public void getHDLSipInfoAndInitSDK(string homeId) |
| | | { |
| | | try |
| | | { |
| | | //先清空呼叫和监视设备信息 |
| | | InitCallInfo(null); |
| | | HDLSipInfo mHDLSipInfo = GetHDLSipInfo(homeId); |
| | | if (mHDLSipInfo != null) |
| | | { |
| | | InitLinphone(); |
| | | mHDLSipInfo.homeId = homeId; |
| | | SetAccountAndLogin(mHDLSipInfo); |
| | | //Application.RunOnMainThread(() => |
| | | //{ |
| | | // InitLinphone(); |
| | | // SetAccountAndLogin(mHDLSipInfo); |
| | | //}); |
| | | } |
| | | } |
| | | catch |
| | | { |
| | | |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | #region ■ -- 跳转监控页面_______________________________ |
| | | /// <summary> |
| | | /// 跳转监控页面 |
| | |
| | | /// <param name="mESVideoInfo"></param> |
| | | public void ShowESVideoMonitor(ESVideoInfo mESVideoInfo) |
| | | { |
| | | InitLinphone(); |
| | | //sip账号为空 |
| | | if (string.IsNullOrEmpty(mESVideoInfo.deviceSipAccount)) |
| | | { |
| | | |
| | | HDLCommon.Current.ShowAlert(Language.StringByID(StringId.shebeibucunzai)); |
| | | return; |
| | | } |
| | | HDLCallVideoInfo mHDLCallVideoInfo = new HDLCallVideoInfo(); |
| | | mHDLCallVideoInfo.HomeId = mESVideoInfo.HomeId; |
| | | mHDLCallVideoInfo.DeviceId = mESVideoInfo.Lc_DeviceId; |
| | |
| | | InitCallInfo(mHDLCallVideoInfo); |
| | | |
| | | #if __IOS__ |
| | | |
| | | |
| | | HDLLinPhoneSDK.Instance().CallWithUserName(mHDLCallVideoInfo.DeviceSipAccount, mHDLCallVideoInfo.DeviceName); |
| | | |
| | | #else |
| | | //1.先呼叫设备 |
| | | Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.CallTo(mHDLCallVideoInfo.DeviceSipAccount, true); |
| | |
| | | |
| | | #region ■ -- 跳转呼叫页面_______________________________ |
| | | /// <summary> |
| | | /// 跳转呼叫页面 |
| | | /// 收到推送,后判断呼叫住宅是否为当前住宅,不是的话重新获取SIP账号并登录 |
| | | /// </summary> |
| | | /// <param name="mESVideoInfo"></param> |
| | | public void ShowESVideoIntercom(ESVideoInfo mESVideoInfo) |
| | | { |
| | | InitLinphone(); |
| | | |
| | | HDLCallVideoInfo mHDLCallVideoInfo = new HDLCallVideoInfo(); |
| | | mHDLCallVideoInfo.CallId = mESVideoInfo.callId; |
| | | mHDLCallVideoInfo.HomeId = mESVideoInfo.HomeId; |
| | |
| | | mHDLCallVideoInfo.DeviceSipAccount = mESVideoInfo.deviceSipAccount; |
| | | InitCallInfo(mHDLCallVideoInfo); |
| | | |
| | | //当前呼叫来电的住宅和之前注册登录的住宅一致的情况下 |
| | | if (currentHDLSipInfo != null && currentHDLSipInfo.homeId == mESVideoInfo.HomeId) |
| | | { |
| | | Utlis.WriteLine("CALL 收到推送 推送住宅和之前注册登录的住宅一致"); |
| | | CheckCallStateAndGotoPage(); |
| | | } |
| | | else |
| | | { |
| | | //注意:之前没登录SIP账号或者住宅不一致的情况下需要重新获取SIP账号 |
| | | //获取呼叫住宅的SIP账号并登录 |
| | | Utlis.WriteLine("CALL 收到推送 其他住宅,重新获取呼叫住宅的SIP账号并登录"); |
| | | new Thread(() => |
| | | { |
| | | GetHDLSipInfoAndInitSDK(mESVideoInfo.HomeId); |
| | | }) |
| | | { IsBackground = false }.Start(); |
| | | |
| | | // |
| | | CheckCallStateAndGotoPage(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 检测来电状态,判断是否马上打开呼叫页面,如果还没来电则开启线程检测等待 |
| | | /// </summary> |
| | | /// <param name="mESVideoInfo"></param> |
| | | public void CheckCallStateAndGotoPage() |
| | | { |
| | | //如果开启了自动跳转方案,则无需继续下面处理、无需手动跳转 |
| | | if (IsAutoJumpCallView) return; |
| | | |
| | | //检测是否来电了如果是直接调整呼叫页面如果不是则开启线程等待判断 |
| | | if (IsIncomingReceivedCallState()) { |
| | | Utlis.WriteLine("CALL 已经来电了。。。打开呼叫页面"); |
| | | GoToHDLLinphoneIntercomActivity(); |
| | | } |
| | | else |
| | | { |
| | | //如果还没来电 开启线程检测 |
| | | StartCheckIncomingCallThread(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 是否来电状态 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | bool IsIncomingReceivedCallState() { |
| | | #if __IOS__ |
| | | |
| | | return HDLLinPhoneSDK.Instance().IsIncomingReceivedCallState; |
| | | #else |
| | | var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneIntercomActivity)); ; |
| | | intent.PutExtra(HDLLinphoneKit.KeyTitleName, mHDLCallVideoInfo.DeviceName); |
| | | return HDLLinphoneKit.Instance.IsIncomingReceivedCallState; |
| | | #endif |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 跳转打开原生的呼叫页面 |
| | | /// </summary> |
| | | void GoToHDLLinphoneIntercomActivity() { |
| | | |
| | | #if __IOS__ |
| | | |
| | | HDLLinPhoneSDK.Instance().GotoHDLLinphoneIntercomVC(mHDLCallVideoInfo.DeviceName); |
| | | |
| | | #else |
| | | var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneIntercomActivity)); |
| | | if (mHDLCallVideoInfo != null) |
| | | { |
| | | intent.PutExtra(HDLLinphoneKit.KeyTitleName, mHDLCallVideoInfo.DeviceName); |
| | | } |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | #endif |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 检测来电线程 |
| | | /// </summary> |
| | | Thread checkIncomingCallThread = null; |
| | | /// <summary> |
| | | /// 线程结束 |
| | | /// </summary> |
| | | int threadTime = 15; |
| | | /// <summary> |
| | | /// 开启检测来电线程 |
| | | /// </summary> |
| | | void StartCheckIncomingCallThread() |
| | | { |
| | | try |
| | | { |
| | | Utlis.WriteLine("CALL 还没来电,开启线程"); |
| | | threadTime = 15; |
| | | //结束之前的线程 |
| | | EndCheckIncomingCallThread(); |
| | | //新建线程 |
| | | checkIncomingCallThread = new Thread(() => |
| | | { |
| | | try |
| | | { |
| | | //15S后自动结束线程 |
| | | while (threadTime > 0) |
| | | { |
| | | threadTime--; |
| | | Utlis.WriteLine("CALL 检测中...." + threadTime); |
| | | Thread.Sleep(1000); |
| | | //来电了,跳转呼叫页面 |
| | | if (IsIncomingReceivedCallState()) |
| | | { |
| | | Utlis.WriteLine("CALL 来电了。。。打开呼叫页面"); |
| | | threadTime = 0;//跳出循环,关闭线程 |
| | | Application.RunOnMainThread(() => |
| | | { |
| | | GoToHDLLinphoneIntercomActivity(); |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | catch { } |
| | | }); |
| | | //开启线程 |
| | | checkIncomingCallThread.Start(); |
| | | } |
| | | catch { } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 结束线程 |
| | | /// </summary> |
| | | void EndCheckIncomingCallThread() |
| | | { |
| | | if (checkIncomingCallThread != null) |
| | | { |
| | | try |
| | | { |
| | | checkIncomingCallThread.Interrupt(); |
| | | } |
| | | catch { } |
| | | checkIncomingCallThread = null; |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | |
| | |
| | | { |
| | | Toast.MakeText(Application.Activity, text, ToastLength.Short).Show(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 接听事件 |
| | | /// </summary> |
| | | public void OnAnswerAction() |
| | | { |
| | | showToast("接听"); |
| | | //showToast("接听"); |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 挂断事件 |
| | | /// </summary> |
| | | /// <param name="callDuration"></param> |
| | | public void OnHangUpAction(int callDuration) |
| | | { |
| | | |
| | | showToast("挂断 通话时长:" + callDuration); |
| | | //showToast("挂断 通话时长:" + callDuration); |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 拒接事件 |
| | | /// </summary> |
| | | public void OnRejectCallAction() |
| | | { |
| | | showToast("拒接"); |
| | | //showToast("拒接"); |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); |
| | | } |
| | | |
| | | public void OnScreenshotSuccessfulAction(Bitmap p0) |
| | | /// <summary> |
| | | /// 截图成功事件 |
| | | /// </summary> |
| | | /// <param name="p0"></param> |
| | | public void OnScreenshotSuccessfulAction(Bitmap imgBitmap) |
| | | { |
| | | showToast("截图成功"); |
| | | //showToast("截图成功"); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 开锁事件 |
| | | /// </summary> |
| | | public void OnUnlockAction() |
| | | { |
| | | hdlLinphone.HDLUnlockAction(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 来电事件 |
| | | /// </summary> |
| | | /// <param name="userName"></param> |
| | | public void OnIncomingCall(string userName) |
| | | { |
| | | Utlis.WriteLine("OnIncomingCall :" + userName); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <summary> |
| | | /// 清楚通知栏所有通知 |
| | | /// </summary> |
| | | void CancelAllNotification() { |
| | | void CancelAllNotification() |
| | | { |
| | | NotificationManager nMgr = (NotificationManager)Application.Activity.GetSystemService(Context.NotificationService); |
| | | nMgr.CancelAll(); |
| | | } |
| | | |
| | | #endif |
| | | #endregion |
| | | |
| | | #region ■ -- iOS相关操作_______________________________ |
| | | |
| | | #if __IOS__ |
| | | |
| | | #region OnHDLLinphoneCallDelegate |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | OnHDLLinphoneCallDelegate mOnHDLLinphoneCallDelegate; |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | public class OnHDLLinphoneCallDelegate : HDLLinphoneCallDelegate |
| | | { |
| | | [Weak] HDLLinphone hdlLinphone; |
| | | |
| | | public OnHDLLinphoneCallDelegate(HDLLinphone mHDLLinphone) |
| | | { |
| | | this.hdlLinphone = mHDLLinphone; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 接听 |
| | | /// </summary> |
| | | public override void OnAnswerAction() |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 挂断 |
| | | /// </summary> |
| | | /// <param name="callDuration"></param> |
| | | public override void OnHangUpAction(int callDuration) |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.RECEIVED, InterphoneType.HDL, callDuration); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 拒接 |
| | | /// </summary> |
| | | public override void OnRejectCallAction() |
| | | { |
| | | hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); |
| | | } |
| | | |
| | | ///// <summary> |
| | | ///// 截图成功 |
| | | ///// </summary> |
| | | ///// <param name="image"></param> |
| | | //public override void OnScreenshotSuccessfulAction(UIImage image) |
| | | //{ |
| | | // ////NSData imageData = UIImagePNGRepresentation(image); UIImage |
| | | // //NSData imageData = image.AsPNG(); |
| | | // //byte[] dataBytes = new byte[imageData.Length]; |
| | | // //System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, dataBytes, 0, Convert.ToInt32(imageData.Length)); |
| | | // ////image.g |
| | | // ////hdlLinphone.ScreenshotSuccessfulAction(dataBytes); |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// 开锁成功 |
| | | /// </summary> |
| | | public override void OnUnlockAction() |
| | | { |
| | | hdlLinphone.HDLUnlockAction(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 来电中... |
| | | /// </summary> |
| | | public override void OnIncomingCall(string userName) |
| | | { |
| | | Utlis.WriteLine("OnIncomingCall :" + userName); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | #endregion |
| | | #endif |
| | | |
| | | #endregion |
| | | |
| | | } |
| | | |
| | | /// <summary> |