| | |
| | | } |
| | | else if (jpushMessageInfo.messageType.Contains(PushMessageType.FLCall.ToString())) |
| | | { |
| | | #if DEBUG |
| | | #if __Android__ |
| | | |
| | | ShowAlert("来电通知!!!!"); |
| | | if (string.IsNullOrEmpty(jpushMessageInfo.expantContent)) return; |
| | | |
| | | #else |
| | | ESOnVideo.Current.Test(); |
| | | #endif |
| | | #endif |
| | | //解析呼叫的门口机UUID信息,并跳转丰林呼叫页面 |
| | | //ESVideoInfo eSVideoInfo = new ESVideoInfo() |
| | | //{ |
| | | // DeviceName = "室外机88", |
| | | // ESVideoUUID = "JJY000019VPLLF", |
| | | //}; |
| | | //ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo); |
| | | ESVideoInfo eSVideoInfo = GetESOnVideoJson(jpushMessageInfo.expantContent); |
| | | |
| | | if (eSVideoInfo == null) return; |
| | | |
| | | if (string.IsNullOrEmpty(eSVideoInfo.uuid)) return; |
| | | |
| | | if (eSVideoInfo.uuid.Contains(",")) |
| | | { |
| | | var uuid = eSVideoInfo.uuid.Split(','); |
| | | eSVideoInfo.ESVideoUUID = uuid[0]; |
| | | } |
| | | else |
| | | { |
| | | eSVideoInfo.ESVideoUUID = eSVideoInfo.uuid; |
| | | } |
| | | |
| | | ESOnVideo.Current.ShowESvideoVideoIntercom(eSVideoInfo); |
| | | |
| | | } |
| | | } |
| | |
| | | catch(Exception EX) |
| | | { |
| | | Utlis.WriteLine("catch: " + EX.ToString()); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="jsonStr"></param> |
| | | /// <returns></returns> |
| | | ESVideoInfo GetESOnVideoJson(string jsonStr) |
| | | { |
| | | try |
| | | { |
| | | if (!string.IsNullOrEmpty(jsonStr)) |
| | | { |
| | | return Newtonsoft.Json.JsonConvert.DeserializeObject<ESVideoInfo>(jsonStr); |
| | | } |
| | | return null; |
| | | } |
| | | catch |
| | | { |
| | | return null; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | #if __IOS__ |
| | | //iOS |
| | | |
| | | //初始化萤石云SDK,中文国内key、英文海外key 开发者账号使用应用包名申请的APPKEY,不同包名应用需配置不同的APPKEY |
| | | EZSDK.IOS.EZSDK.InitLibWithAppKey("1aa98a90489b4838b966b57018b4b04b", "1aa98a90489b4838b966b57018b4b04b"); |
| | | //1.设置所需河东的AccessToken和RefreshToken、域名地址 |
| | | EZSDK.IOS.EZSDK.SetHDlAccessToken(UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken); |
| | | EZSDK.IOS.EZSDK.SetRequestHttpsHost(OnAppConfig.Instance.RequestHttpsHost); |