| | |
| | | <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> |
| | | <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent> |
| | | <AndroidUseAapt2>true</AndroidUseAapt2> |
| | | <AndroidSupportedAbis>armeabi-v7a</AndroidSupportedAbis> |
| | | <AndroidSupportedAbis>arm64-v8a</AndroidSupportedAbis> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
| | | <DebugSymbols>True</DebugSymbols> |
| | |
| | | <AndroidEnableMultiDex>false</AndroidEnableMultiDex> |
| | | <AndroidUseAapt2>true</AndroidUseAapt2> |
| | | <EmbedAssembliesIntoApk>true</EmbedAssembliesIntoApk> |
| | | <AndroidSupportedAbis>arm64-v8a;armeabi-v7a</AndroidSupportedAbis> |
| | | </PropertyGroup> |
| | | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
| | | <DebugSymbols>True</DebugSymbols> |
| | |
| | | /// 固定域名,正式环境 |
| | | /// 公共域名就近解析 |
| | | /// </summary> |
| | | public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | //public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; |
| | | public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; |
| | | const string APP_KEY = "HDL-HOME-APP-TEST"; |
| | | const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; |
| | | |
| | |
| | | /// <summary> |
| | | /// 解绑住宅下的第三方设备 |
| | | /// </summary> |
| | | public const string Api_Post_UnbindDeviceToHome = "/smart-open/open-platform/tripartite/unbindDeviceToHome"; |
| | | public const string Api_Post_UnbindDeviceToHome = "/home-wisdom/app/open/unbindDeviceToHome"; |
| | | |
| | | #endregion |
| | | |
| | |
| | | /// 获取属性当前状态 |
| | | /// </summary> |
| | | /// <param name="key"></param> |
| | | /// <param name="defaultValue">默认值</param> |
| | | /// <returns></returns> |
| | | public string GetAttrState(string key, string defaultValue = "0") |
| | | { |
| | |
| | | if (string.IsNullOrEmpty(attrState.state)) |
| | | { |
| | | //二级查询keyValue值 |
| | | return GetOriginalState(key); |
| | | return GetOriginalState(key, defaultValue); |
| | | } |
| | | return attrState.state; |
| | | } |
| | |
| | | /// 默认值:0 |
| | | /// </summary> |
| | | /// <param name="key">语雀定义的属性值</param> |
| | | /// <param name="defaultValue">默认值</param> |
| | | /// <returns></returns> |
| | | public string GetOriginalState(string key) |
| | | public string GetOriginalState(string key, string defaultValue) |
| | | { |
| | | var originalState = status.Find((s) => s.key == key.ToString()); |
| | | if (originalState == null || string.IsNullOrEmpty(originalState.value)) |
| | | { |
| | | return "0"; |
| | | return defaultValue; |
| | | } |
| | | return originalState.value; |
| | | } |
| | |
| | | |
| | | }); |
| | | //信号源 |
| | | sourceFrameLayout.selectAction += (text) => |
| | | sourceFrameLayout.selectAction += (key) => |
| | | { |
| | | string value = text.Replace(" ", "_"); |
| | | var p = new UI2.Intelligence.Automation.PublicInterface(); |
| | | var dic = p.GetHisenseSignalSourceDic(); |
| | | string value = p.GetValue(dic, key); |
| | | ControlCommand(HisenseTVFunctionalAttributeConstant.signal, value); |
| | | }; |
| | | |
| | |
| | | var responsePackNew = UI.Music.SendMethod.Current.RequestServerhomeId(d, NewAPI.Api_Post_UnbindDeviceToHome, "删除海信电视"); |
| | | if (!this.DataChecking(responsePackNew, tipType)) |
| | | { |
| | | action?.Invoke(false); |
| | | //action?.Invoke(false); |
| | | return; |
| | | } |
| | | action?.Invoke(true); |
| | | } |
| | |
| | | /// <summary> |
| | | /// 发送控制命令 |
| | | /// </summary> |
| | | /// <param name="function">当前设备</param> |
| | | /// <param name="device">当前设备</param> |
| | | /// <param name="dic">发送控制数据</param> |
| | | public void SendControlCommand(Function function, Dictionary<string, string> dic,Action<bool> action) |
| | | public void SendControlCommand(Function device, Dictionary<string, string> dic,Action<bool> action) |
| | | { |
| | | new System.Threading.Thread(() => |
| | | { |
| | | var result = DriverLayer.Control.Ins.SendWriteCommand(function, dic, false, 0); |
| | | var result = DriverLayer.Control.Ins.SendWriteCommand(device, dic, false, 0); |
| | | action?.Invoke(result); |
| | | |
| | | }) |