| | |
| | | |
| | | //字段兼容问题,只能直接取值了 |
| | | var json = Newtonsoft.Json.Linq.JObject.Parse(jpushMessageInfo.expantContent); |
| | | try |
| | | { |
| | | //var pushHomeId = json["homeId"]; |
| | | //if (pushHomeId == null || string.IsNullOrEmpty(pushHomeId.ToString())){ |
| | | // Console.WriteLine("homeId is null"); |
| | | // return; |
| | | //} |
| | | var pushTime = json["pushTime"]; |
| | | if(pushTime == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(pushTime.ToString())) |
| | | { |
| | | var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); |
| | | if (pushDateTime.AddSeconds(30) < DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | |
| | | |
| | | //1.视对讲厂家类型 |
| | | string interphoneTypeEnum = json["interphoneTypeEnum"].ToString(); |
| | |
| | | } |
| | | else if (interphoneTypeEnum == InterphoneType.HDL.ToString()) |
| | | { |
| | | try |
| | | { |
| | | var pushTime = json["pushTime"]; |
| | | if (pushTime == null) |
| | | { |
| | | return; |
| | | } |
| | | if (!string.IsNullOrEmpty(pushTime.ToString())) |
| | | { |
| | | var pushDateTime = Utlis.UnixToDateTimeMS(Convert.ToInt64(pushTime)); |
| | | if (pushDateTime.AddSeconds(30) < DateTime.Now) |
| | | { |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | catch { } |
| | | //HDL Linphone 狄耐克 |
| | | eSVideoInfo.HomeId = jpushMessageInfo.HomeId; |
| | | eSVideoInfo.callId = json["callId"].ToString(); |
| | |
| | | ((BaseActivity)Shared.Application.Activity).SetPermission(result => |
| | | { |
| | | //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.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, "1aa98a90489b4838b966b57018b4b04b", 1, DB_ResidenceData.Instance.CurrentRegion.id, |
| | | HttpUtil.APP_KEY, HttpUtil.SECRET_KEY); |
| | | Com.Videogo.Hdl.HDLEzvizSdk.Instance.JumpToCameraListActivity(Shared.Application.Activity, list); |
| | | //if (result) |
| | | //{ |
| | |
| | | } |
| | | else |
| | | { |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | if (result.Code != "-1") |
| | | IMessageCommon.Current.ShowErrorInfoAlter(result.Code); |
| | | } |
| | | } |
| | | catch (Exception ex) |