| | |
| | | using HDL_ON.DAL.Server; |
| | | using HDL_ON.Entity; |
| | | #if __Android__ |
| | | using Android.App; |
| | | using Android.Content; |
| | | using Android.Graphics; |
| | | using Android.Widget; |
| | |
| | | { |
| | | public HDLLinphone() |
| | | { |
| | | //判断有没有初始化SDK,没初始化过初始化一次 |
| | | InitLinphone(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <returns></returns> |
| | | bool CheckmHDLCallVideoInfoIsNullOrEmpty() |
| | | { |
| | | //return false; |
| | | return (mHDLCallVideoInfo == null || string.IsNullOrEmpty(mHDLCallVideoInfo.CallId)); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 截图成功 |
| | | /// 截图成功 暂时废弃 |
| | | /// </summary> |
| | | public void ScreenshotSuccessfulAction(byte[] dataBytes) |
| | | { |
| | |
| | | { |
| | | Dictionary<string, object> dic = new Dictionary<string, object>(); |
| | | dic.Add("deviceId", mHDLCallVideoInfo.DeviceId);//设备id |
| | | dic.Add("callId", mHDLCallVideoInfo.CallId); |
| | | dic.Add("interphoneType", mHDLCallVideoInfo.InterphoneType); |
| | | dic.Add("homeId", mHDLCallVideoInfo.HomeId); |
| | | dic.Add("callId", mHDLCallVideoInfo.CallId);//当前呼叫id |
| | | dic.Add("interphoneType", mHDLCallVideoInfo.InterphoneType);//可视对讲厂家类型 |
| | | dic.Add("homeId", mHDLCallVideoInfo.HomeId);//住宅ID |
| | | var requestJson = HttpUtil.GetSignRequestJson(dic); |
| | | var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_VideoDevice_OpenDoorbell, requestJson); |
| | | |
| | |
| | | } |
| | | #endif |
| | | |
| | | |
| | | }); |
| | | |
| | | |
| | |
| | | Dictionary<string, object> dic = new Dictionary<string, object>(); |
| | | dic.Add("callId", mHDLCallVideoInfo.CallId);//呼叫id |
| | | dic.Add("callStatus", callStatusType.ToString());//可用值:MISSED,RECEIVED,REJECT |
| | | dic.Add("interphoneTypeEnum", interphoneType.ToString());//可用值:FLVI,IMOUVISIAL |
| | | dic.Add("interphoneTypeEnum", interphoneType.ToString()); |
| | | if (callStatusType == CallStatusType.RECEIVED && callDuration > 0) |
| | | { |
| | | dic.Add("callDuration", callDuration);//通话时长(秒) |
| | |
| | | #if __IOS__ |
| | | |
| | | #else |
| | | //1.先呼叫设备 |
| | | Com.Hdl.Hdllinphonesdk.HDLLinphoneKit.Instance.CallTo(mHDLCallVideoInfo.DeviceSipAccount, true); |
| | | //2.跳转打开监控页面 |
| | | var intent = new Intent(Shared.Application.Activity, typeof(Com.Hdl.Hdllinphonesdk.Activity.HDLLinphoneMonitorActivity)); ; |
| | | intent.PutExtra(HDLLinphoneKit.KeyTitleName, mHDLCallVideoInfo.DeviceName); |
| | | intent.PutExtra(HDLLinphoneKit.KeyTitleName, mHDLCallVideoInfo.DeviceName);//传入设备名称为显示标题 |
| | | Shared.Application.Activity.StartActivity(intent); |
| | | #endif |
| | | |
| | |
| | | HDLLinphoneKit.Instance.OnHDLLinphoneCallListener = new HDLLinphoneCallListener(this); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 清楚通知栏所有通知 |
| | | /// </summary> |
| | | void CancelAllNotification() { |
| | | NotificationManager nMgr = (NotificationManager)Application.Activity.GetSystemService(Context.NotificationService); |
| | | nMgr.CancelAll(); |
| | | } |
| | | |
| | | #endif |
| | | #endregion |
| | | } |