DLL/Aliyun.Api.LogService.dllBinary files differ
DLL/Android/HdlEzvizDroid.dllBinary files differ
DLL/IOS/EZSDK.IOS.dllBinary files differ
DLL/IOS/HDL.Shared.IOS.ScanQRCode.dllBinary files differ
DLL/Shared.IOS-1.dllBinary files differ
HDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_off.pngHDL-ON_Android/Assets/Phone/FunctionIcon/Light/LightScene/gp_all_on.pngHDL-ON_Android/HDL-ON_Android.csproj
@@ -164,9 +164,6 @@ <Reference Include="UMSdkDroid"> <HintPath>..\DLL\UMeng\UMSdkDroid.dll</HintPath> </Reference> <Reference Include="Shared.Droid.HDLLinphone"> <HintPath>..\DLL\Linphone\Android\Shared.Droid.HDLLinphone.dll</HintPath> </Reference> <Reference Include="Mono.Android.Export" /> <Reference Include="ScanSdk"> <HintPath>..\DLL\Scan\ScanSdk.dll</HintPath> @@ -195,8 +192,14 @@ <Reference Include="Shared.Droid"> <HintPath>..\DLL\Android\Shared.Droid.dll</HintPath> </Reference> <Reference Include="Shared.Droid.HDLLinphone"> <HintPath>..\DLL\Linphone\Android\Shared.Droid.HDLLinphone.dll</HintPath> </Reference> <Reference Include="HdlEzvizDroid"> <HintPath>..\DLL\HdlEzvizDroid.dll</HintPath> <HintPath>..\DLL\Android\HdlEzvizDroid.dll</HintPath> </Reference> <Reference Include="Aliyun.Api.LogService"> <HintPath>..\DLL\Aliyun.Api.LogService.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> @@ -973,6 +976,18 @@ <PackageReference Include="Square.OkHttp3"> <Version>3.14.4</Version> </PackageReference> <PackageReference Include="Google.Protobuf"> <Version>3.5.1</Version> </PackageReference> <PackageReference Include="Microsoft.AspNet.WebApi.Client"> <Version>5.2.4</Version> </PackageReference> <PackageReference Include="Iconic.Zlib.Netstandard"> <Version>1.0.0</Version> </PackageReference> <PackageReference Include="lz4net"> <Version>1.0.15.93</Version> </PackageReference> </ItemGroup> <ItemGroup> <AndroidAsset Include="Assets\Language.ini" /> HDL-ON_Android/Properties/AndroidManifest.xml
@@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.3" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202401031"> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="2.4.5" package="com.hdl.onpro" xmlns:tools="http://schemas.android.com/tools" android:versionCode="202405211"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <!--友盟--> HDL-ON_iOS/AppDelegate.cs
@@ -268,16 +268,16 @@ /// </summary> void SetCurrentLanguage() { if (string.IsNullOrEmpty(OnAppConfig.Instance.SetLanguage)) { //if (string.IsNullOrEmpty(OnAppConfig.Instance.SetLanguage)) //{ if (NSLocale.PreferredLanguages[0].Contains("zh-")) { Language.CurrentLanguage = "Chinese"; } else if (NSLocale.PreferredLanguages[0].Contains("cs-")) { Language.CurrentLanguage = "Czech"; } //else if (NSLocale.PreferredLanguages[0].Contains("cs-")) //{ // Language.CurrentLanguage = "Czech"; //} else if (NSLocale.PreferredLanguages[0].Contains("ru-")) { Language.CurrentLanguage = "russian"; @@ -297,11 +297,11 @@ { Language.CurrentLanguage = "English"; } } else { Language.CurrentLanguage = OnAppConfig.Instance.SetLanguage; } //} //else //{ // Language.CurrentLanguage = OnAppConfig.Instance.SetLanguage; //} } public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/12422688.pngBinary files differ
HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/1792828.pngBinary files differ
HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/26881242.pngBinary files differ
HDL-ON_iOS/Assets.xcassets/LaunchImage.launchimage/8281792.pngBinary files differ
HDL-ON_iOS/Assets.xcassets/preview_stopplay_btn .imageset/Contents.json
@@ -11,7 +11,6 @@ "scale" : "2x" }, { "filename" : "preview_stopplay_btn @3x.png", "idiom" : "universal", "scale" : "3x" } HDL-ON_iOS/HDL-ON_iOS.csproj
@@ -30,6 +30,7 @@ <CodesignProvision>OnPro2307291-Dev</CodesignProvision> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <MtouchI18n>cjk</MtouchI18n> <MtouchSdkVersion>17.5</MtouchSdkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>none</DebugType> @@ -55,12 +56,13 @@ <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <MtouchDebug>true</MtouchDebug> <MtouchI18n>cjk</MtouchI18n> <MtouchLink>None</MtouchLink> <MtouchLink>SdkOnly</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchEnableSGenConc>false</MtouchEnableSGenConc> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnPro2307291-Dev</CodesignProvision> <CodesignProvision>0002-OnPro-240704-1-Dev</CodesignProvision> <MtouchSdkVersion>17.5</MtouchSdkVersion> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> <DebugType>none</DebugType> @@ -70,12 +72,13 @@ <WarningLevel>4</WarningLevel> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <MtouchArch>ARM64</MtouchArch> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> <MtouchLink>SdkOnly</MtouchLink> <MtouchExtraArgs>-gcc_flags="-dead_strip -ObjC"</MtouchExtraArgs> <MtouchI18n>cjk</MtouchI18n> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnPro2307291-Dev</CodesignProvision> <CodesignProvision>Automatic</CodesignProvision> <MtouchSdkVersion>17.5</MtouchSdkVersion> </PropertyGroup> <ItemGroup> <Reference Include="System" /> @@ -119,6 +122,9 @@ <Reference Include="Shared.IOS"> <HintPath>..\DLL\Shared.IOS.dll</HintPath> </Reference> <Reference Include="Aliyun.Api.LogService"> <HintPath>..\DLL\Aliyun.Api.LogService.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <PackageReference Include="Newtonsoft.Json"> @@ -141,6 +147,18 @@ </PackageReference> <PackageReference Include="Xamarin.iOS.SwiftRuntimeSupport"> <Version>0.2.1</Version> </PackageReference> <PackageReference Include="Google.Protobuf"> <Version>3.5.1</Version> </PackageReference> <PackageReference Include="Microsoft.AspNet.WebApi.Client"> <Version>5.2.4</Version> </PackageReference> <PackageReference Include="Iconic.Zlib.Netstandard"> <Version>1.0.0</Version> </PackageReference> <PackageReference Include="lz4net"> <Version>1.0.15.93</Version> </PackageReference> </ItemGroup> <ItemGroup> @@ -440,10 +458,6 @@ <ImageAsset Include="Assets.xcassets\wifi_bg.imageset\wifi_bg.png" /> <ImageAsset Include="Assets.xcassets\device_bg.imageset\Contents.json" /> <ImageAsset Include="Assets.xcassets\device_bg.imageset\device_bg.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\12422688.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\8281792.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\26881242.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\1792828.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\11252436.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\24361125.png" /> <ImageAsset Include="Assets.xcassets\LaunchImage.launchimage\640960.png" /> HDL-ON_iOS/Info.plist
@@ -11,7 +11,7 @@ <key>CFBundleName</key> <string>On Pro</string> <key>CFBundleShortVersionString</key> <string>2.4.3</string> <string>2.4.8</string> <key>CFBundleURLTypes</key> <array> <dict> @@ -36,7 +36,7 @@ </dict> </array> <key>CFBundleVersion</key> <string>2.4.3</string> <string>2.4.8</string> <key>LSApplicationQueriesSchemes</key> <array> <string>weixinULAPI</string> HDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_off.pngHDL-ON_iOS/Resources/Phone/FunctionIcon/Light/LightScene/gp_all_on.pngHDL-ON_iOS/mono_crash.6efc3ba32.0.json
File was deleted HDL-ON_iOS/mono_crash.824c6d50c.0.json
File was deleted HDL-ON_iOS/mono_crash.824c6d50c.1.json
File was deleted HDL_APP_Project.sln
@@ -25,6 +25,10 @@ .editorconfig = .editorconfig EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NunitTest-Ios", "NunitTest-Ios\NunitTest-Ios.csproj", "{C70A6AA7-2FBA-4A37-9132-AD49BD037899}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NunitTest-Android", "NunitTest-Android\NunitTest-Android.csproj", "{7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}" EndProject Global GlobalSection(SharedMSBuildProjectFiles) = preSolution HDL_ON\HDL_ON.projitems*{09712674-2a38-407b-b1e2-560b2c352f9a}*SharedItemsImports = 4 @@ -138,6 +142,30 @@ {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhone.Build.0 = Release|Any CPU {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {3A0E9FF9-56B6-4323-9AE6-2B22975E399B}.Release|iPhoneSimulator.Build.0 = Release|Any CPU {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|Any CPU.ActiveCfg = Debug|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|Any CPU.Build.0 = Debug|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|iPhone.ActiveCfg = Debug|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|iPhone.Build.0 = Debug|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|iPhoneSimulator.ActiveCfg = Debug|iPhoneSimulator {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Debug|iPhoneSimulator.Build.0 = Debug|iPhoneSimulator {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|Any CPU.ActiveCfg = Release|iPhoneSimulator {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|Any CPU.Build.0 = Release|iPhoneSimulator {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|iPhone.ActiveCfg = Release|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|iPhone.Build.0 = Release|iPhone {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|iPhoneSimulator.ActiveCfg = Release|iPhoneSimulator {C70A6AA7-2FBA-4A37-9132-AD49BD037899}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|Any CPU.Build.0 = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|iPhone.ActiveCfg = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|iPhone.Build.0 = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|Any CPU.ActiveCfg = Release|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|Any CPU.Build.0 = Release|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|iPhone.ActiveCfg = Release|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|iPhone.Build.0 = Release|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU {7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}.Release|iPhoneSimulator.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE HDL_ON/Common/AliyunLog/AliyunLogClient.cs
New file @@ -0,0 +1,160 @@ using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; using Aliyun.Api.LogService; using Aliyun.Api.LogService.Domain.Log; using Aliyun.Api.LogService.Domain.LogStore.Index; using Aliyun.Api.LogService.Infrastructure.Protocol; namespace HDL_ON.Common.AliyunLog { public class AliyunLogClient { // 日志服务的服务接入点。此处以杭州为例,其它地域请根据实际情况填写。 private static string endpoint = "cn-hangzhou.log.aliyuncs.com"; // 本示例从环境变量中获取AccessKey ID和AccessKey Secret。 private static string accessKeyId = "LTAI5tLzDxrtsFyi3xtK3YWt"; private static string accessKeySecret = "eX31JZrRAvC2wZWPiZU0SYhlfAUMoT"; // Project名称。 private static string project = "hdl-onpro-log"; // Logstore名称。 private static string logstore = "log"; // 创建日志服务Client。 private static ILogServiceClient client = BuildSimpleClient(); public static ILogServiceClient BuildSimpleClient() => LogServiceClientBuilders.HttpBuilder .Endpoint(endpoint, project) .Credential(accessKeyId, accessKeySecret) .Build(); public AliyunLogClient() { } //// 构建最简单的`ILogServiceClient`。 //public static ILogServiceClient BuildSimpleClient() // => LogServiceClientBuilders.HttpBuilder // // 服务入口<endpoint>及项目名<projectName> // .Endpoint(endpoint, project) // // 访问密钥信息 // .Credential(accessKeyId, accessKeySecret) // .Build(); //static async Task Main(string[] args) //{ // // 创建Project。 // var proRes = await client.CreateProjectAsync(project, "des"); // check(proRes); // Console.WriteLine("Create project success"); // Thread.Sleep(120 * 1000); // // 创建Logstore。 // var storeRes = await client.CreateLogStoreAsync(logstore, 3, 2); // check(storeRes); // Console.WriteLine("Create logstore success"); // Thread.Sleep(10 * 1000); // // 为Logstore创建索引。 // var indRes = await client.CreateIndexAsync(logstore, new IndexLineInfo(new[] { ' ', ',' })); // check(indRes); // Console.WriteLine("Create Index success"); // Thread.Sleep(60 * 1000); // // 向Logstore写入数据。 // await PostLogs(); // Console.WriteLine("Post logs success"); // Thread.Sleep(3000); // // 查询日志。 // await GetLogs(); //} //public static async Task GetLogs() //{ // var logsRes = await client.GetLogsAsync(logstore, DateTimeOffset.UtcNow.AddMinutes(-1), // DateTimeOffset.UtcNow, // "test", "", 100, 0); // check(logsRes); // foreach (var log in logsRes.Result.Logs) // { // foreach (var key in log.Keys) // { // log.TryGetValue(key, out var value); // Console.WriteLine(key + " : " + value); // } // Console.WriteLine("======"); // } //} /// <summary> /// 日志推送 /// </summary> /// <param name="topic">推送标题</param> /// <param name="msg">推送信息</param> /// <returns></returns> public static async Task PostLogs(string topic, string msg) { if (client == null) { client = BuildSimpleClient(); } try { var pushObj = new LogGroupInfo { Topic = topic, #if __ANDROID__ Source = "Android", #else Source = "IOS", #endif LogTags = new Dictionary<string, string> { {"tag1", DateTime.Now.ToLongTimeString()}, }, Logs = new List<LogInfo> { new LogInfo { Time = DateTimeOffset.Now, Contents = new Dictionary<string, string> { {"id", DateTime.Now.Ticks.ToString()}, {"homeid", Entity.DB_ResidenceData.Instance.CurrentRegion.id}, {"userid", UserInfo.Current.ID}, {"userName", UserInfo.Current.userName}, {"server", DAL.Server.HttpUtil.GlobalRequestHttpsHost}, {"message", msg}, } } } }; var response = await client.PostLogStoreLogsAsync(logstore, pushObj); check(response); } catch (Exception ex) { MainPage.Log(ex.Message); } } public static void check(IResponse res) { if (!res.IsSuccess) { MainPage.Log("日志推送不成功."); //throw new ApplicationException(res.Error.ErrorMessage); } } } } HDL_ON/Common/AliyunLog/AliyunLogInvokeAsync.cs
New file @@ -0,0 +1,173 @@ using System; using System.Linq; using System.Threading.Tasks; using Aliyun.Api.LogService; using Aliyun.Api.LogService.Domain; using Aliyun.Api.LogService.Domain.Log; using Aliyun.Api.LogService.Infrastructure.Protocol; namespace HDL_ON.Common.AliyunLog { public class AliyunLogInvokeAsync { public AliyunLogInvokeAsync() { } /// <summary> /// 执行请求方法。 /// </summary> public static async Task<GetLogsResult> Invoke(ILogServiceClient client) { var response = await client.GetLogsAsync ( // 「必填参数」会在 Request 构造器中列出,并且不可set; new GetLogsRequest("example-logstore", (Int32)DateTimeOffset.UtcNow.AddDays(-1).ToUnixTimeSeconds(), (Int32)DateTimeOffset.UtcNow.ToUnixTimeSeconds()) { // 「可选参数」不会在 Request 构造器中列出,可通过setter设置。 Offset = 1, Line = 100, } ); var result = response // 此方法会确保返回的响应失败时候抛出`LogServiceException`。 .EnsureSuccess() // 此处获取Result是安全的。 .Result; Console.WriteLine($"RequestId:{response.RequestId}"); Console.WriteLine($"日志总数:{result.Count}"); Console.WriteLine($"首条日志:{result.Logs.FirstOrDefault()}"); return result; } /// <summary> /// 在调用时可使用扩展方法,扩展方法会将简单的请求对象的属性展开到方法入参中。 /// 使用扩展方法 `using Aliyun.Api.Log;` 即可。 /// </summary> public static async Task<GetLogsResult> InvokeUsingExtension(ILogServiceClient client) { var response = await client.GetLogsAsync ( // 「必填参数」作为方法的普通必须参数 "example-logstore", DateTimeOffset.UtcNow.AddDays(-1), DateTimeOffset.UtcNow, // 「可选参数」作为方法的可选参数,可通过命名参数方式指定 offset: 1, line: 10 ); var result = response // 此方法会确保返回的响应失败时候抛出`LogServiceException`。 .EnsureSuccess() // 此处获取Result是安全的。 .Result; Console.WriteLine($"RequestId:{response.RequestId}"); Console.WriteLine($"日志总数:{result.Count}"); Console.WriteLine($"首条日志:{result.Logs.FirstOrDefault()}"); return result; } /// <summary> /// 处理服务器返回(包含在Response中)的错误。 /// </summary> public static async Task<GetLogsResult> InvokeWithErrorHandling(ILogServiceClient client) { var response = await client.GetLogsAsync ( // 「必填参数」作为方法的普通必须参数 "example-logstore", DateTimeOffset.UtcNow.AddDays(-1), DateTimeOffset.UtcNow, // 「可选参数」作为方法的可选参数,可通过命名参数方式指定 offset: 1, line: 10 ); GetLogsResult result; // 尝试处理可处理的错误。 if (!response.IsSuccess) { // 错误码 var errorCode = response.Error.ErrorCode; // 错误消息 var errorMessage = response.Error.ErrorMessage; Console.WriteLine($"RequestId:{response.RequestId}"); Console.WriteLine($"错误码:{errorCode}"); Console.WriteLine($"错误信息:{errorMessage}"); // `ErrorCode`类可支持与自身实例或字符串进行对比。 if (errorCode == ErrorCode.SignatureNotMatch /* SDK中预定义的错误码 */) { // 在这里处理业务可处理的错误。。。。。。 Console.WriteLine("Signature not match, {0}.", errorMessage); } else if (errorCode == "ParameterInvalid" /* 业务相关特殊的SDK中未定义的错误码 */) { // 在这里处理业务可处理的错误。。。。。。 Console.WriteLine("Parameter invalid, {0}.", errorMessage); } // 任何处理不到的错误请务必抛出异常中断原流程,避免外部获取到 null 的结果! throw new Exception("这里可以是系统的业务异常。" + response.Error /* 最好带上服务返回的错误信息以便调试 */); } else { // 此处获取Result是安全的。 result = response.Result; } Console.WriteLine($"RequestId:{response.RequestId}"); Console.WriteLine($"日志总数:{result.Count}"); Console.WriteLine($"首条日志:{result.Logs.FirstOrDefault()}"); return result; } /// <summary> /// 处理以异常形式抛出的错误。 /// </summary> public static async Task<GetLogsResult> InvokeWithExceptionHandling(ILogServiceClient client) { try { return await Invoke(client); } catch (LogServiceException e) { // 错误码 var errorCode = e.ErrorCode; // 错误消息 var errorMessage = e.ErrorMessage; Console.WriteLine($"RequestId:{e.RequestId}"); Console.WriteLine($"错误码:{errorCode}"); Console.WriteLine($"错误信息:{errorMessage}"); // `ErrorCode`类可支持与自身实例或字符串进行对比。 if (errorCode == ErrorCode.SignatureNotMatch /* SDK中预定义的错误码 */) { // 在这里处理业务可处理的错误。。。。。。 Console.WriteLine("Signature not match, {0}.", errorMessage); } else if (errorCode == "ParameterInvalid" /* 业务相关特殊的SDK中未定义的错误码 */) { // 在这里处理业务可处理的错误。。。。。。 Console.WriteLine("Parameter invalid, {0}.", errorMessage); } // 任何处理不到的错误请务必抛出异常中断原流程,避免外部获取到 null 的结果! throw new Exception("这里可以是系统的业务异常。", e /* 在自定义的异常中最好带上服务返回的异常以便调试 */); } } } } HDL_ON/Common/ApiUtlis.cs
@@ -72,12 +72,14 @@ /// 下载数据完成标记 /// </summary> public bool DownloadDataComplete = false; public bool hadInternet = true; /// <summary> /// 下载数据 /// </summary> public void DownloadData() { if (MainPage.InternetStatus == 0 || MainPage.NoLoginMode) if (MainPage.NoLoginMode) { DownloadDataComplete = true; return; @@ -92,13 +94,84 @@ var waitPage = new Loading(); MainPage.BaseView.AddChidren(waitPage); waitPage.Start(Language.StringByID(StringId.PleaseWait)); string code = StateCode.SUCCESS; Inverter.Ins.H5Page = null;//重置光伏页面 var downloadDataThread = new System.Threading.Thread(() => { try { //增加3秒云服务器连接检测,连不上服务器的时候不刷新数据 hadInternet = true; var dataList = new List<GlobalRegionListRes>(); var requestJson = HttpUtil.GetSignRequestJson(new GetRegionListObj() { regionMark = HttpUtil.RegionMark }); var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GlobalRegionList, requestJson, HttpUtil.GlobalRequestHttpsHost, "", 3); if (revertObj == null || revertObj.Code != StateCode.SUCCESS) { DownloadDataComplete = true; hadInternet = false; try { var spatialInfoDataBytes = FileUtlis.Files.ReadFile("SpatialInfoData"); if (spatialInfoDataBytes != null) { var spatialInfoDataString = System.Text.Encoding.UTF8.GetString(spatialInfoDataBytes); if (spatialInfoDataString != null && !string.IsNullOrEmpty(spatialInfoDataString)) { var spatialInfoDataList = JsonConvert.DeserializeObject<List<SpatialInfo>>(spatialInfoDataString); SpatialInfo.CurrentSpatial.UpdateSpatialList(spatialInfoDataList); } } } catch (Exception ex) { MainPage.Log($"{this.GetType()}:加载缓存房间数据异常:{ex.Message}"); } try { var fileList = Common.FileUtlis.Files.ReadFiles(); foreach (var file in fileList) { FunctionList.List.IniFunctionList(file, true); } Room.CurrentSpatial.InitRoomListFunctions(); } catch (Exception ex) { MainPage.Log($"{this.GetType()}:加载缓存设备数据异常:{ex.Message}"); } return; } else { hadInternet = true; } } catch (Exception ex) { MainPage.Log($"Error:下载数据1:{ex.Message}"); DownloadDataComplete = true; return; } finally { if (!hadInternet) { Application.RunOnMainThread(() => { if (waitPage != null) { waitPage.Hide(); waitPage.RemoveFromParent(); } }); } } MainPage.Log($"进入读取云端数据线程"); //===================刷新Token======================= code = Ins.HttpRequest.RefreshToken(); @@ -191,13 +264,25 @@ if (roomResult.Code == StateCode.SUCCESS) { MainPage.Log($"读取房间信息成功"); var revData = Newtonsoft.Json.JsonConvert.DeserializeObject<SpatialApiPack>(roomResult.Data.ToString()); var revData = JsonConvert.DeserializeObject<SpatialApiPack>(roomResult.Data.ToString()); if (revData == null) { revData = new SpatialApiPack(); } { SpatialInfo.CurrentSpatial.UpdateSpatialList(revData.list); new System.Threading.Thread(() => { try { var ssd = System.Text.Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(revData.list)); FileUtlis.Files.WriteFileByBytes("SpatialInfoData", ssd); }catch(Exception ex) { MainPage.Log($"{this.GetType()}:保存房间信息异常:{ex.Message}"); } }) { IsBackground = true }.Start(); } } else @@ -536,7 +621,7 @@ //======================安防==================== GetSecurityList(); //===================读取逻辑列表========================== //===================读取逻辑列表==================== Logic.LogicList.Clear();//主页下拉强制刷新自动化列表 MainView.GetLogicList();//读取自动化列表 }) HDL_ON/Common/Constant.cs
@@ -239,6 +239,10 @@ /// /// </summary> LOGIC, /// <summary> /// 组控 /// </summary> GROUPCONTROL, } /// <summary> HDL_ON/Common/HDLCommon.cs
@@ -312,28 +312,7 @@ //字段兼容问题,只能直接取值了 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(); @@ -372,6 +351,23 @@ } 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(); @@ -776,7 +772,8 @@ ((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) //{ @@ -806,7 +803,8 @@ } else { IMessageCommon.Current.ShowErrorInfoAlter(result.Code); if (result.Code != "-1") IMessageCommon.Current.ShowErrorInfoAlter(result.Code); } } catch (Exception ex) HDL_ON/DAL/DriverLayer/Control.cs
@@ -1617,6 +1617,17 @@ case SPK.MusicStandard: //UI.Music.MusicMain.mMusicMain.RefreshView(updateTemp); Console.WriteLine("音乐播放器显示状态=======" + revString); foreach (var music in UI.Music.A31MusicModel.A31MusicModelList)//每次收到数据都要更新一下时间 { if (music.functionMusic.sid == localFunction.sid) { music.LastDateTime = DateTime.Now; } } if (UI.Music.A31MusicModel.Current != null) { UI.Music.A31MusicModel.Current.LastDateTime = DateTime.Now; } //wjc break; case SPK.Inverter: HDL_ON/DAL/DriverLayer/Control_Udp.cs
@@ -393,8 +393,26 @@ } } break; case SPK.OtherCommon: case SPK.OtherCommon://2024-02-01 15:19:28 foreach (var attr in f.status) { if (attr.key == FunctionAttributeKey.OnOff) { byte onOffValue = 0; switch (attr.value) { case "on": onOffValue = 0; break; case "off": onOffValue = 255; break; } ControlBytesSend(Command.SetCommonSwitch, f.localFunction.bus.SubnetID, f.localFunction.bus.DeviceID, new byte[] { f.localFunction.bus.LoopId, onOffValue }); break; } } break; } } @@ -446,21 +464,24 @@ { case SPK.LightCCT: #region cct light byte b0 = 100; if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) byte b0 = Convert.ToByte(function.lastBrightness); if (commandDictionary.ContainsKey(FunctionAttributeKey.Brightness)) { if (function.trait_on_off.curValue.ToString() == "off") { b0 = 0; } else { b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); } else { b0 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) { if (function.trait_on_off.curValue.ToString() == "off") { b0 = 0; } else { b0 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } } } var bytes0 = new byte[] { function.bus.LoopId, b0, @@ -474,21 +495,24 @@ break; case SPK.LightRGB: #region rgb light byte b = 100; if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) byte b = Convert.ToByte(function.lastBrightness); if (commandDictionary.ContainsKey(FunctionAttributeKey.Brightness)) { if (function.trait_on_off.curValue.ToString() == "off") { b = 0; } else { b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); } else { b = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) { if (function.trait_on_off.curValue.ToString() == "off") { b = 0; } else { b = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } } } var tempLight = new Light(); var bytes = new byte[] { function.bus.LoopId, @@ -503,21 +527,24 @@ break; case SPK.LightDimming: #region dimming light byte b1 = 100; if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) byte b1 = Convert.ToByte(function.lastBrightness); if (commandDictionary.ContainsKey(FunctionAttributeKey.Brightness)) { if (function.trait_on_off.curValue.ToString() == "off") { b1 = 0; } else { b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); } else { b1 = Convert.ToByte(function.GetAttrState(FunctionAttributeKey.Brightness)); if (commandDictionary.ContainsKey(FunctionAttributeKey.OnOff)) { if (function.trait_on_off.curValue.ToString() == "off") { b1 = 0; } else { b1 = function.lastBrightness == 0 ? (byte)100 : Convert.ToByte(function.lastBrightness); } } } ControlBytesSend(Command.SetSingleLight, subnetId, deviceId, new byte[] { function.bus.LoopId, HDL_ON/DAL/DriverLayer/UdpSocket.cs
@@ -43,8 +43,14 @@ if (Port == 0) return; busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); busSocket.EnableBroadcast = true; try { busSocket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); busSocket.EnableBroadcast = true; }catch(Exception ex) { MainPage.Log("Socket 异常 : " + ex.Message); } try { busSocket.Bind(new IPEndPoint(IPAddress.Any, Port)); HDL_ON/DAL/Mqtt/MqttClient.cs
@@ -13,6 +13,8 @@ using HDL_ON.UI; using HDL_ON.DAL.Server; using HDL_ON; using Newtonsoft.Json; using System.Collections.Generic; namespace HDL_ON.DAL.Mqtt { @@ -159,6 +161,7 @@ public static void InitState() { IfNeedReadAllDeviceStatus = true; Common.ApiUtlis.Ins.hadInternet = true; StartCloudMqtt(); } @@ -338,7 +341,13 @@ public static async Task StartCloudMqtt() { //没有网络的状态下尝试一下连接mqtt ,安卓的网络状态变化监听有异常,修改底层麻烦 if (MainPage.InternetStatus == 0 && MainPage.LinkHdlMqttCount > 1) if (MainPage.InternetStatus == 0 && MainPage.LinkHdlMqttCount > 1 ) { return; } if (!Common.ApiUtlis.Ins.hadInternet) { return; } @@ -364,6 +373,26 @@ await Task.Factory.StartNew((Func<Task>)(async () => { try { try { //增加3秒云服务器连接检测,连不上服务器的时候不刷新数据 var dataList = new List<GlobalRegionListRes>(); var requestJson = HttpUtil.GetSignRequestJson(new GetRegionListObj() { regionMark = HttpUtil.RegionMark }); var revertObj = HttpUtil.RequestHttpsPost(NewAPI.API_POST_GlobalRegionList, requestJson, HttpUtil.GlobalRequestHttpsHost, "", 3); if (revertObj == null || revertObj.Code != StateCode.SUCCESS) { Common.ApiUtlis.Ins.hadInternet = false; return; } else { Common.ApiUtlis.Ins.hadInternet = true; } } catch { } #region 初始化远程Mqtt RemoteMqttIsConnecting = true; RemoteMqttClient = new MqttFactory().CreateMqttClient(); HDL_ON/DAL/Server/HttpServerRequest.cs
@@ -1538,7 +1538,7 @@ } #endregion #region 获取天气部分 #region 获取天气部分 /// <summary> /// 获取指定经纬度的城市信息天气信息 /// </summary> HDL_ON/DAL/Server/HttpUtil.cs
@@ -19,13 +19,18 @@ /// 公共域名就近解析 /// </summary> 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"; public const string APP_KEY = "HDL-HOME-APP"; public const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//开发环境 //const string APP_KEY = "CPEVRLRT";//开发环境APP_KEY //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ";//开发环境SECRET_KEY //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; //public const string APP_KEY = "HDL-HOME-APP-TEST"; //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm //const string APP_KEY = "CPEVRLRT"; //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ"; /// <summary> /// RegionMark /// </summary> @@ -33,7 +38,7 @@ /// <summary> /// 请求超时时间 /// </summary> public const int TIME_OUT = 15; public const int TIME_OUT = 10; /// <summary> /// 特殊接口请求超时时间 /// </summary> @@ -157,6 +162,11 @@ { return new ResponsePackNew() { Code = "0" ,Data = "" }; } if (!Common.ApiUtlis.Ins.hadInternet) { MainPage.Log("没有外网,直接退出请求"); return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR, message = Language.StringByID(StringId.FailedRequestServer) }; } #region HttpWebRequest try { @@ -209,7 +219,7 @@ } } IRestResponse response = client.Execute(request); HDL_ON.Utlis.WriteLine("发送", requestFullUrl, response.Request.Body?.Value.ToString()); MainPage.Log("发送:"+ requestFullUrl, response.Request.Body?.Value.ToString()); if(apiPath == NewAPI.API_POST_Login) { var ddd = Newtonsoft.Json.JsonConvert.SerializeObject(response); @@ -256,14 +266,14 @@ } catch { } } return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR }; return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR, message = Language.StringByID(StringId.FailedRequestServer) }; } } catch (Exception ex) { HDL_ON.Utlis.WriteLine(ex.Message); return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR }; return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR ,message = Language.StringByID(StringId.FailedRequestServer) }; } #endregion @@ -498,14 +508,14 @@ else { HDL_ON.Utlis.WriteLine(response.Content); return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR }; return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR, message = Language.StringByID(StringId.FailedRequestServer) }; } } catch (Exception ex) { HDL_ON.Utlis.WriteLine(ex.Message); return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR }; return new ResponsePackNew() { Code = StateCode.NETWORK_ERROR, message = Language.StringByID(StringId.FailedRequestServer) }; } #endregion HDL_ON/DAL/Server/NewAPI.cs
@@ -884,6 +884,12 @@ /// </summary> public const string API_POST_VideoDevice_UpdateCallStatus = "/home-wisdom/platform/imou/updateCallStatus"; /// <summary> /// 拒接(挂段所有呼叫) /// </summary> public const string API_POST_VideoDevice_RejectCallIn = "/home-wisdom/platform/imou/updateCallStatus"; /// <summary> /// 获取通话记录 /// </summary> public const string API_POST_FL_GetCallList = "/home-wisdom/platform/imou/listCallRecords"; HDL_ON/DAL/Server/NewApiRes.cs
@@ -1396,7 +1396,7 @@ /// </summary> public string childAccountId; /// <summary> /// 分享类型 1.ROOM 2.DEVICE 3.SCENE /// 分享类型 1.ROOM 2.DEVICE 3.SCENE 4.DEVICE_GROUP_CONTROL /// </summary> public string shareType = "DEVICE"; } HDL_ON/DAL/ThirdPartySdk/ESOnVideo.cs
@@ -291,7 +291,8 @@ { var ezChildAccessToken = result.Data.ToString(); 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.JumpToEZRealPlayActivity(Application.Activity, mESVideoInfo.Lc_DeviceId, mESVideoInfo.DeviceSerial, mESVideoInfo.spk, mESVideoInfo.msgId); HDL_ON/DAL/ThirdPartySdk/HDLLinphone.cs
@@ -426,9 +426,39 @@ { IsBackground = false }.Start(); } /// <summary> /// 拒接(挂段所有呼叫) /// </summary> public void HDLRejectCallIn() { if (CheckmHDLCallVideoInfoIsNullOrEmpty()) return; new Thread(() => { Dictionary<string, object> dic = new Dictionary<string, object>(); dic.Add("homeId", DB_ResidenceData.Instance.CurrentRegion.id); dic.Add("deviceId", mHDLCallVideoInfo.DeviceId); dic.Add("interphoneType", "HDL"); dic.Add("callId", mHDLCallVideoInfo.CallId);//呼叫id var requestJson = HttpUtil.GetSignRequestJson(dic); var revertObj = HttpUtil.RequestHttpsPostFroHome(NewAPI.API_POST_VideoDevice_RejectCallIn, requestJson); if (revertObj.Code == StateCode.SUCCESS) { } else { Utlis.WriteLine("POST 更新状态失败 code: " + revertObj.Code); } }) { IsBackground = false }.Start(); } #endregion #region ■ -- 跳转监控页面_______________________________ /// <summary> /// 跳转监控页面 @@ -734,6 +764,7 @@ { //showToast("拒接"); hdlLinphone.HDLUpdateCallStatus(CallStatusType.REJECT, InterphoneType.HDL); hdlLinphone.HDLRejectCallIn(); } /// <summary> HDL_ON/Entity/Function/EmptyXmlFile.xml
New file @@ -0,0 +1,1568 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="202404121" android:versionName="2.4.4" android:compileSdkVersion="29" android:compileSdkVersionCodename="10" package="com.hdl.onpro" platformBuildVersionCode="29" platformBuildVersionName="10"> <uses-sdk android:minSdkVersion="26" android:targetSdkVersion="29" /> <uses-permission android:name="android.permission.RECEIVE_SMS" /> <uses-permission android:name="android.permission.USE_CREDENTIALS" /> <uses-permission android:name="android.permission.FLASHLIGHT" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" /> <uses-permission android:name="android.permission.CHANGE_WIFI_STATE" /> <uses-permission android:name="android.permission.READ_SETTINGS" /> <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" /> <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /> <uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.CAMERA" /> <uses-feature android:name="android.hardware.camera" /> <uses-feature android:name="android.hardware.camera.autofocus" /> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" /> <permission android:name="com.hdl.onpro.permission.JPUSH_MESSAGE" android:protectionLevel="0x2" /> <uses-permission android:name="com.hdl.onpro.permission.JPUSH_MESSAGE" /> <uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" /> <uses-permission android:name="android.permission.READ_PHONE_STATE" /> <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" /> <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> <uses-permission android:name="android.permission.READ_LOGS" /> <application android:theme="@ref/0x7f1000bf" android:label="On Pro" android:icon="@ref/0x7f080229" android:name="crc64a361f3362083484c.Application" android:debuggable="false" android:allowBackup="true" android:largeHeap="true" android:extractNativeLibs="true" android:networkSecurityConfig="@ref/0x7f120003" android:requestLegacyExternalStorage="true"> <provider android:name="android.support.v4.content.FileProvider" android:exported="false" android:authorities="com.hdl.onpro.fileProvider" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@ref/0x7f120000" /> </provider> <provider android:name="Shared.Droid.JPush.HmsContentProvider" android:exported="false" android:authorities="com.hdl.onpro.hmspushprovider" /> <service android:name="cn.jpush.android.service.PushService" android:enabled="true" android:exported="false"> <intent-filter> <action android:name="cn.jpush.android.intent.REGISTER" /> <action android:name="cn.jpush.android.intent.REPORT" /> <action android:name="cn.jpush.android.intent.PushService" /> <action android:name="cn.jpush.android.intent.PUSH_TIME" /> </intent-filter> </service> <provider android:name="cn.jpush.android.service.DataProvider" android:exported="true" android:authorities="com.hdl.onpro.DataProvider" /> <service android:name="cn.jpush.android.service.DaemonService" android:enabled="false" android:exported="true"> <intent-filter> <action android:name="cn.jpush.android.intent.DaemonService" /> <category android:name="com.hdl.onpro" /> </intent-filter> </service> <provider android:name="cn.jpush.android.service.DownloadProvider" android:exported="true" android:authorities="com.hdl.onpro.DownloadProvider" /> <receiver android:name="cn.jpush.android.service.PushReceiver" android:enabled="true"> <intent-filter android:priority="1000"> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <category android:name="com.hdl.onpro" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.USER_PRESENT" /> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> </intent-filter> <intent-filter> <action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name="android.intent.action.PACKAGE_REMOVED" /> <data android:scheme="package" /> </intent-filter> </receiver> <activity android:theme="@ref/0x01030006" android:name="cn.jpush.android.ui.PushActivity" android:exported="false" android:configChanges="0xa0"> <intent-filter> <action android:name="cn.jpush.android.ui.PushActivity" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <activity android:theme="@ref/0x7f1000be" android:name="cn.jpush.android.ui.PopWinActivity" android:exported="false" android:configChanges="0xa0"> <intent-filter> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <activity android:theme="@ref/0x01030010" android:name="cn.jpush.android.service.DActivity" android:enabled="true" android:exported="true" android:taskAffinity="jpush.custom"> <intent-filter> <action android:name="cn.jpush.android.intent.DActivity" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <receiver android:name="cn.jpush.android.service.AlarmReceiver" /> <receiver android:name="cn.jpush.android.service.SchedulerReceiver" android:exported="false" /> <activity android:theme="@ref/0x01030010" android:name="cn.jpush.android.service.JNotifyActivity" android:exported="true" android:taskAffinity="jpush.custom"> <intent-filter> <action android:name="cn.jpush.android.intent.JNotifyActivity" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <meta-data android:name="JPUSH_CHANNEL" android:value="developer-default" /> <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" /> <meta-data android:name="XIAOMI_APPKEY" android:value="MI-5871892343860" /> <meta-data android:name="XIAOMI_APPID" android:value="MI-2882303761518923860" /> <meta-data android:name="OPPO_APPKEY" android:value="OP-e942dafe77cf4b9f868d5421d701655a" /> <meta-data android:name="OPPO_APPID" android:value="OP-30619979" /> <meta-data android:name="OPPO_APPSECRET" android:value="OP-11d511c42f654cafac99588322681003" /> <meta-data android:name="com.amap.api.v2.apikey" android:value="9901dd06e30b229efdd4c5bf5e076224" /> <receiver android:name="com.hdl.onpro.JPushFirmBroadcast" android:enabled="true" android:exported="false"> <intent-filter> <action android:name="com.hdl.onpro.jpush.firm.NOTIFICATION_OPENED" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> <activity android:theme="@ref/0x01030010" android:name="com.hdl.onpro.JPushOpenClickActivity" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="com.hdl.onpro.JPushOpenClickActivity" /> <action android:name="android.intent.action.VIEW" /> <category android:name="com.hdl.onpro" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </activity> <activity android:theme="@ref/0x7f1000dd" android:name="com.hdl.onpro.SplashActivity" android:exported="true" android:launchMode="2" android:screenOrientation="1"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> <intent-filter> <action android:name="com.hdl.onpro.SplashActivity" /> <action android:name="android.intent.action.VIEW" /> </intent-filter> </activity> <receiver android:name="crc64a361f3362083484c.JPushReceiver" android:enabled="true" android:exported="false"> <intent-filter> <action android:name="cn.jpush.android.intent.RECEIVE_MESSAGE" /> <category android:name="com.hdl.onpro" /> </intent-filter> </receiver> <service android:name="crc64a361f3362083484c.JPushService" android:enabled="true" android:exported="false" android:process=":pushcore"> <intent-filter> <action android:name="cn.jiguang.user.service.action" /> </intent-filter> </service> <activity android:theme="@ref/0x7f1000c0" android:label="VideoActivity" android:name="crc64a361f3362083484c.VideoActivity" android:launchMode="3" android:screenOrientation="1" android:configChanges="0x24b4" android:windowSoftInputMode="0x10" /> <activity android:theme="@ref/0x7f1000c0" android:label="LeChengVideoActivity" android:name="crc64a361f3362083484c.LeChengVideoActivity" android:launchMode="3" android:screenOrientation="1" android:configChanges="0x24b4" android:windowSoftInputMode="0x10" /> <activity android:theme="@ref/0x7f1000c0" android:label="WebviewActivity" android:name="crc64a361f3362083484c.WebviewActivity" /> <activity android:theme="@ref/0x7f1000c0" android:label="AgreementActivity" android:name="crc64a361f3362083484c.AgreementActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000c0" android:label="CustomCaptureActivity" android:name="crc64a361f3362083484c.CustomCaptureActivity" android:screenOrientation="1" /> <activity android:label="ScanActivity" android:name="crc64a361f3362083484c.ScanActivity" /> <activity android:theme="@ref/0x01030007" android:name="crc6468d826ada19e2599.CameraActivity" /> <activity android:name="crc6468d826ada19e2599.BaseActivity" android:launchMode="2" android:screenOrientation="1" android:configChanges="0x24b4" android:windowSoftInputMode="0x10" /> <service android:name="crc6468d826ada19e2599.GPSLocationService" /> <service android:name="crc640a749fedc412b87d.MusicService" /> <service android:name="crc64a98abb514ffad9f1.KeepAliveService" /> <activity android:label="Scanner" android:name="crc6480997b3ef81bf9b2.ZxingActivity" android:configChanges="0x1a0" /> <provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:authorities="com.hdl.onpro.mono.MonoRuntimeProvider.__mono_init__" android:initOrder="1999999999" /> <provider android:name="mono.MonoRuntimeProvider_1" android:exported="false" android:process=":pushcore" android:authorities="com.hdl.onpro.mono.MonoRuntimeProvider_1.__mono_init__" android:initOrder="1999999998" /> <meta-data android:name="android.support.VERSION" android:value="26.1.0" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.EnvGuideActivity" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.DeviceListActivity" android:exported="false" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.DeviceDetailActivity" android:exported="false" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.DeviceOnlineMediaPlayActivity" android:exported="false" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.DeviceRecordListActivity" android:exported="false" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:theme="@ref/0x7f100009" android:name="com.lechange.demo.ui.DeviceRecordPlayActivity" android:exported="false" android:launchMode="1" android:screenOrientation="1" android:configChanges="0x4a4" /> <service android:name="com.mm.android.deviceaddmodule.services.TimeFilterService" /> <receiver android:name="com.mm.android.deviceaddmodule.receiver.SucceedClickReceiver" /> <receiver android:name="com.mm.android.deviceaddmodule.receiver.TimeoutClickReceiver" /> <activity android:theme="@ref/0x7f10000b" android:label="@ref/0x7f0f02e7" android:name="com.mm.android.deviceaddmodule.DeviceAddActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" android:windowSoftInputMode="0x22" /> <activity android:theme="@ref/0x7f10000b" android:name="com.mm.android.deviceaddmodule.device_wifi.DeviceWifiListActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" android:windowSoftInputMode="0x22" /> <activity android:theme="@ref/0x7f10000b" android:name="com.mm.android.deviceaddmodule.device_wifi.DeviceWifiPasswordActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" android:windowSoftInputMode="0x22" /> <activity android:theme="@ref/0x7f10000b" android:name="com.mm.android.deviceaddmodule.device_wifi.ErrorTipActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" android:windowSoftInputMode="0x22" /> <activity android:theme="@ref/0x7f10000b" android:name="com.mm.android.deviceaddmodule.device_wifi.HiddenWifiActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" android:windowSoftInputMode="0x22" /> <service android:name="com.mm.android.deviceaddmodule.SeachDeviceService" /> <meta-data android:name="meta-data4type" android:value="@ref/0x7f0f0151" /> <meta-data android:name="meta-data4host" android:value="@ref/0x7f0f0248" /> <meta-data android:name="meta-ishttps" android:value="false" /> <provider android:name="android.support.v4.content.FileProvider" android:exported="false" android:authorities="com.hdl.onpro.fileprovider" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@ref/0x7f120000" /> </provider> <activity android:theme="@ref/0x7f1001c9" android:name="com.mm.android.deviceaddmodule.mobilecommon.base.ProgressActivity" android:exported="false" android:launchMode="3" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:name="com.widget.jlcountrycode.JLCountryCodeActivity" /> <activity android:name="com.widget.jlcountrycode.JLSortSelectionActivity" /> <meta-data android:name="android.arch.lifecycle.VERSION" android:value="27.0.0-SNAPSHOT" /> <service android:name="com.hdl.on.jpush.androidjpush.JPushService" android:exported="false" android:process=":pushcore"> <intent-filter> <action android:name="cn.jiguang.user.service.action" /> </intent-filter> </service> <activity android:theme="@ref/0x7f1000be" android:name="cn.jpush.android.ui.PopWinActivity" android:exported="true"> <intent-filter> <category android:name="android.intent.category.DEFAULT" /> <action android:name="cn.jpush.android.ui.PopWinActivity" /> <category android:name="${JPUSH_PKGNAME}" /> </intent-filter> </activity> <activity android:theme="@ref/0x01030006" android:name="cn.jpush.android.ui.PushActivity" android:exported="true" android:configChanges="0xa0"> <intent-filter> <action android:name="cn.jpush.android.ui.PushActivity" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="${JPUSH_PKGNAME}" /> </intent-filter> </activity> <provider android:name="cn.jpush.android.service.DataProvider" android:exported="false" android:process=":pushcore" android:authorities="${JPUSH_PKGNAME}.DataProvider" /> <provider android:name="cn.jpush.android.service.DownloadProvider" android:exported="true" android:authorities="${JPUSH_PKGNAME}.DownloadProvider" /> <activity android:theme="@ref/0x7f1000ba" android:name="cn.jpush.android.service.JNotifyActivity" android:exported="true" android:taskAffinity="@string/0x29"> <intent-filter> <action android:name="cn.jpush.android.intent.JNotifyActivity" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <activity android:theme="@ref/0x7f1000ba" android:name="cn.android.service.JTransitActivity" android:exported="true" android:taskAffinity="@string/0x29"> <intent-filter> <action android:name="cn.android.service.JTransitActivity" /> <category android:name="android.intent.category.DEFAULT" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <receiver android:name="cn.jpush.android.asus.AsusPushMessageReceiver" android:exported="false" /> <service android:name="cn.jpush.android.service.PushService" android:enabled="true" android:exported="false" android:process=":pushcore"> <intent-filter> <action android:name="cn.jpush.android.intent.REGISTER" /> <action android:name="cn.jpush.android.intent.REPORT" /> <action android:name="cn.jpush.android.intent.PushService" /> <action android:name="cn.jpush.android.intent.PUSH_TIME" /> </intent-filter> </service> <service android:name="cn.jpush.android.service.DaemonService" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="cn.jpush.android.intent.DaemonService" /> <category android:name="${JPUSH_PKGNAME}" /> </intent-filter> </service> <activity android:theme="@ref/0x01030010" android:name="cn.jpush.android.service.DActivity" android:enabled="true" android:exported="true" android:taskAffinity="@string/0x29"> <intent-filter> <action android:name="cn.jpush.android.intent.DActivity" /> <category android:name="${JPUSH_PKGNAME}" /> </intent-filter> <intent-filter> <action android:name="cn.jpush.android.intent.DActivity" /> <category android:name="com.hdl.onpro" /> </intent-filter> </activity> <receiver android:name="cn.jpush.android.service.PushReceiver" android:enabled="true" android:exported="false"> <intent-filter android:priority="1000"> <action android:name="cn.jpush.android.intent.NOTIFICATION_RECEIVED_PROXY" /> <category android:name="${JPUSH_PKGNAME}" /> </intent-filter> <intent-filter> <action android:name="android.net.conn.CONNECTIVITY_CHANGE" /> </intent-filter> </receiver> <receiver android:name="cn.jpush.android.service.AlarmReceiver" android:exported="false" /> <service android:name="com.xiaomi.push.service.XMJobService" android:permission="android.permission.BIND_JOB_SERVICE" android:enabled="true" android:exported="false" android:process=":pushcore" /> <service android:name="com.xiaomi.push.service.XMPushService" android:enabled="true" android:process=":pushcore" /> <service android:name="com.xiaomi.mipush.sdk.PushMessageHandler" android:enabled="true" android:exported="true" /> <service android:name="com.xiaomi.mipush.sdk.MessageHandleService" android:enabled="true" /> <receiver android:name="com.xiaomi.push.service.receivers.PingReceiver" android:exported="false" android:process=":pushcore"> <intent-filter> <action android:name="com.xiaomi.push.PING_TIMER" /> </intent-filter> </receiver> <receiver android:name="cn.jpush.android.service.PluginXiaomiPlatformsReceiver" android:exported="true"> <intent-filter> <action android:name="com.xiaomi.mipush.RECEIVE_MESSAGE" /> </intent-filter> <intent-filter> <action android:name="com.xiaomi.mipush.MESSAGE_ARRIVED" /> </intent-filter> <intent-filter> <action android:name="com.xiaomi.mipush.ERROR" /> </intent-filter> </receiver> <activity android:theme="@ref/0x01030010" android:name="com.xiaomi.mipush.sdk.NotificationClickedActivity" android:enabled="true" android:exported="true" android:excludeFromRecents="true" android:launchMode="3"> <meta-data android:name="supportStyle" android:value="scene|voip" /> </activity> <service android:name="cn.jpush.android.service.PluginHuaweiPlatformsService" android:exported="false"> <intent-filter> <action android:name="com.huawei.push.action.MESSAGING_EVENT" /> </intent-filter> </service> <receiver android:name="cn.jpush.android.service.PluginMeizuPlatformsReceiver" android:permission="com.meizu.flyme.permission.PUSH" android:exported="true"> <intent-filter> <action android:name="com.meizu.flyme.push.intent.MESSAGE" /> <action android:name="com.meizu.flyme.push.intent.REGISTER.FEEDBACK" /> <action android:name="com.meizu.flyme.push.intent.UNREGISTER.FEEDBACK" /> <action android:name="com.meizu.c2dm.intent.REGISTRATION" /> <action android:name="com.meizu.c2dm.intent.RECEIVE" /> <category android:name="com.hdl.onpro" /> </intent-filter> </receiver> <service android:name="cn.jpush.android.service.PluginOppoPushService" android:permission="com.coloros.mcs.permission.SEND_MCS_MESSAGE" android:exported="true"> <intent-filter> <action android:name="com.coloros.mcs.action.RECEIVE_MCS_MESSAGE" /> </intent-filter> </service> <service android:name="com.heytap.msp.push.service.DataMessageCallbackService" android:permission="com.heytap.mcs.permission.SEND_PUSH_MESSAGE" android:exported="true"> <intent-filter> <action android:name="com.heytap.mcs.action.RECEIVE_MCS_MESSAGE" /> <action android:name="com.heytap.msp.push.RECEIVE_MCS_MESSAGE" /> </intent-filter> </service> <receiver android:name="cn.jpush.android.service.PluginVivoMessageReceiver" android:exported="false"> <intent-filter> <action android:name="com.vivo.pushclient.action.RECEIVE" /> </intent-filter> </receiver> <service android:name="com.vivo.push.sdk.service.CommandClientService" android:permission="com.push.permission.UPSTAGESERVICE" android:exported="true" /> <activity android:theme="@ref/0x01030010" android:name="com.vivo.push.sdk.LinkProxyClientActivity" android:exported="false" android:screenOrientation="1" /> <meta-data android:name="JPUSH_APPKEY" android:value="cbd90743ac45cbca06c8118b" /> <meta-data android:name="sdkVersion" android:value="3100" /> <meta-data android:name="sdk_version_vivo" android:value="484" /> <meta-data android:name="local_iv" android:value="MzMsMzQsMzUsMzYsMzcsMzgsMzksNDAsNDEsMzIsMzgsMzcsMzYsMzUsMzQsMzMsI0AzNCwzMiwzMywzNywzMywzNCwzMiwzMywzMywzMywzNCw0MSwzNSwzNSwzMiwzMiwjQDMzLDM0LDM1LDM2LDM3LDM4LDM5LDQwLDQxLDMyLDM4LDM3LDMzLDM1LDM0LDMzLCNAMzQsMzIsMzMsMzcsMzMsMzQsMzIsMzMsMzMsMzMsMzQsNDEsMzUsMzIsMzIsMzI" /> <receiver android:name="com.huawei.hms.support.api.push.PushMsgReceiver" android:permission="com.hdl.onpro.permission.PROCESS_PUSH_MSG" android:exported="true" android:directBootAware="true"> <intent-filter> <action android:name="com.huawei.intent.action.PUSH_DELAY_NOTIFY" /> <action android:name="com.huawei.intent.action.PUSH" /> </intent-filter> </receiver> <receiver android:name="com.huawei.hms.support.api.push.PushReceiver" android:permission="com.hdl.onpro.permission.PROCESS_PUSH_MSG" android:exported="true" android:directBootAware="true"> <intent-filter> <action android:name="com.huawei.android.push.intent.REGISTRATION" /> <action android:name="com.huawei.android.push.intent.RECEIVE" /> </intent-filter> </receiver> <service android:name="com.huawei.hms.support.api.push.service.HmsMsgService" android:enabled="true" android:exported="true" android:process=":pushservice" android:directBootAware="true"> <intent-filter> <action android:name="com.huawei.push.msg.NOTIFY_MSG" /> <action android:name="com.huawei.push.msg.PASSBY_MSG" /> </intent-filter> </service> <provider android:name="com.huawei.hms.support.api.push.PushProvider" android:readPermission="com.hdl.onpro.permission.PUSH_PROVIDER" android:writePermission="com.hdl.onpro.permission.PUSH_WRITE_PROVIDER" android:exported="true" android:authorities="com.hdl.onpro.huawei.push.provider" /> <meta-data android:name="com.huawei.hms.client.service.name:push" android:value="push:6.5.0.300" /> <meta-data android:name="com.huawei.hms.min_api_level:push:push" android:value="1" /> <activity android:name="com.huawei.hms.support.api.push.TransActivity" android:exported="false" /> <meta-data android:name="JPUSH_CHANNEL" android:value="${JPUSH_CHANNEL}" /> <provider android:name="com.huawei.hms.aaid.InitProvider" android:exported="false" android:authorities="com.hdl.onpro.aaidinitprovider" android:initOrder="500" /> <meta-data android:name="com.huawei.hms.client.service.name:opendevice" android:value="opendevice:6.3.0.305" /> <meta-data android:name="com.huawei.hms.min_api_level:opendevice:push" android:value="1" /> <meta-data android:name="com.huawei.hms.client.service.name:base" android:value="base:6.5.0.300" /> <meta-data android:name="com.huawei.hms.min_api_level:base:hmscore" android:value="1" /> <meta-data android:name="availableLoaded" android:value="yes" /> <activity android:theme="@ref/0x7f1000b0" android:name="com.huawei.hms.activity.BridgeActivity" android:exported="false" android:excludeFromRecents="true" android:screenOrientation="3" android:configChanges="0x40002f84" android:hardwareAccelerated="true"> <meta-data android:name="hwc-theme" android:value="androidhwext:style/Theme.Emui.Translucent" /> </activity> <activity android:name="com.huawei.hms.activity.EnableServiceActivity" android:exported="false" android:configChanges="0xda0" /> <provider android:name="com.huawei.agconnect.core.provider.AGConnectInitializeProvider" android:exported="false" android:authorities="com.hdl.onpro.AGCInitializeProvider" /> <service android:name="com.huawei.agconnect.core.ServiceDiscovery" android:exported="false" /> <activity android:theme="@ref/0x7f10000a" android:name="com.zxing.qrcode.CaptureActivity" android:exported="false" android:screenOrientation="1" android:configChanges="0x4a4" /> <activity android:name="com.hdl.widget.cropimage.CheckPermissionsCropImageActivity" /> <activity android:name="com.hdl.widget.cropimage.HDLCropImageActivity" /> <activity android:name="com.hdl.widget.gdmapkit.GDGeoFenceRoundActivity" /> <activity android:name="com.hdl.widget.gdmapkit.CheckPermissionsActivity" /> <activity android:theme="@ref/0x7f1001cc" android:name="com.journeyapps.barcodescanner.CaptureActivity" android:clearTaskOnLaunch="true" android:stateNotNeeded="true" android:screenOrientation="6" android:windowSoftInputMode="0x3" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.devicemgt.EzDefenceOptionActivity" android:exported="true" /> <activity android:theme="@ref/0x7f1000b7" android:name="com.videogo.ui.lock.HistoryImageActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.common.CollectDeviceInfoActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.streamctrl.RtpStreamPlayActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.common.MoreFeaturesEntranceActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdk.preview.MultiScreenPreviewActivity" /> <activity android:theme="@ref/0x7f1000b8" android:label="测试码流" android:name="com.ezviz.demo.streamctrl.OriginStreamControlActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.MainActivity" android:screenOrientation="1" android:configChanges="0xa0" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdk.debug.TestActivityForFullSdk" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdk.add.AddDeviceToAccountActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.main.EzvizWebViewActivity" android:screenOrientation="1" android:configChanges="0xa0" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.remoteplayback.list.EZPlayBackListActivity" android:screenOrientation="5" android:configChanges="0x4a0" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.cameralist.EZCameraListActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.realplay.EZRealPlayActivity" android:screenOrientation="1" android:configChanges="0x4a0" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.message.EZMessageImageActivity2" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.message.EZMessageActivity2" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.TempPasswordActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.AddTempPasswordActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.AddUserActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.AddUseTimesActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.TempPasswordDetailActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.lock.LockHistoryActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.remoteplayback.EZRemotePlayBackActivity" android:screenOrientation="1" android:configChanges="0x4a0" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.devicemgt.EZDeviceSettingActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.devicemgt.ModifyDeviceNameActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.scan.main.CaptureActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.devicelist.SeriesNumSearchActivity" android:launchMode="2" android:screenOrientation="1" android:windowSoftInputMode="0x10" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.devicelist.AutoWifiConnectingActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:label="@ref/0x7f0f0428" android:name="com.videogo.devicemgt.EZUpgradeDeviceActivity" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.LanDevice.LanDeviceActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.LanDevice.LanDevicePlayActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.LanDevice.LanDeviceActivateActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.SelectDeviceList" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.ui.ddns.EZDDNSListActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.OptionActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.videogo.SupportActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.videotalk.SafetyHatTalkActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.videotalk.WatchVideoTalkActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.videotalk.MultiTestActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="com.ezviz.demo.videotalk.MultiVideoTalkActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.ManualChooseConfigWifiWayActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.ManualInputDeviceHotspotInfoActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.AutoWifiPrepareStepOneActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.AutoWifiNetConfigActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.AutoWifiResetActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.ManualConnectDeviceHotspotActivity" android:screenOrientation="1" /> <activity android:theme="@ref/0x7f1000b8" android:name="ezviz.ezopensdkcommon.configwifi.ConfigWifiExecutingActivity" android:screenOrientation="1" /> <receiver android:name="com.videogo.ui.cameralist.EZCameraListActivity$NotificationReceiver" /> <receiver android:name="com.videogo.hdl.CloudBroadcast" android:enabled="true" android:exported="true"> <intent-filter> <action android:name="hdl.link.broadcast.intent.action" /> <category android:name="android.intent.category.DEFAULT" /> </intent-filter> </receiver> <activity android:name="com.hdl.hdllinphonesdk.activity.HDLLinphoneReverseCallActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> </intent-filter> </activity> <activity android:name="com.hdl.hdllinphonesdk.activity.HDLLinphoneMonitorActivity" /> <activity android:name="com.hdl.hdllinphonesdk.activity.HDLLinphoneIntercomActivity" /> <service android:name="com.hdl.hdllinphonesdk.core.service.HDLLinphoneService" /> <service android:name="com.tencent.tinker.lib.service.TinkerPatchService" android:exported="false" android:process=":patch" /> <service android:name="com.tencent.tinker.lib.service.TinkerPatchService$InnerService" android:exported="false" android:process=":patch" /> <service android:name="com.tencent.tinker.lib.service.DefaultTinkerResultService" android:exported="false" /> </application> <uses-permission android:name="android.permission.USE_FINGERPRINT" /> <uses-permission android:name="android.permission.USE_BIOMETRIC" /> <uses-permission android:name="android.permission.BLUETOOTH" /> <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> <uses-permission android:name="android.permission.POST_NOTIFICATIONS" /> <uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" /> <uses-permission android:name="com.vivo.notification.permission.BADGE_ICON" /> <uses-permission android:name="com.hihonor.android.launcher.permission.CHANGE_BADGE" /> <uses-permission android:name="android.permission.GET_TASKS" /> <permission android:name="com.hdl.onpro.permission.MIPUSH_RECEIVE" android:protectionLevel="0x2" /> <uses-permission android:name="com.hdl.onpro.permission.MIPUSH_RECEIVE" /> <uses-permission android:name="com.coloros.mcs.permission.RECIEVE_MCS_MESSAGE" /> <uses-permission android:name="com.heytap.mcs.permission.RECIEVE_MCS_MESSAGE" /> <permission android:name="com.hdl.onpro.permission.PROCESS_PUSH_MSG" android:protectionLevel="0x2" /> <permission android:name="com.hdl.onpro.permission.PUSH_PROVIDER" android:protectionLevel="0x2" /> <permission android:name="com.hdl.onpro.permission.PUSH_WRITE_PROVIDER" android:protectionLevel="0x2" /> <uses-permission android:name="com.hdl.onpro.permission.PROCESS_PUSH_MSG" /> <uses-permission android:name="com.hdl.onpro.permission.PUSH_PROVIDER" /> <uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" /> <queries> <intent> <action android:name="com.huawei.hms.core.aidlservice" /> </intent> <intent> <action android:name="com.huawei.hms.core" /> </intent> </queries> <uses-permission android:name="android.permission.CHANGE_CONFIGURATION" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="android.permission.WRITE_SETTINGS" /> <uses-feature android:name="android.hardware.camera.front" android:required="false" /> <uses-feature android:name="android.hardware.camera.flash" android:required="false" /> <uses-feature android:name="android.hardware.screen.landscape" android:required="false" /> <uses-feature android:name="android.hardware.wifi" android:required="false" /> <permission android:name="com.hdl.onpro.push.sdk.permission.EZVIZ_MESSAGE" android:protectionLevel="0x2" /> <permission android:name="com.hdl.onpro.permission.C2D_MESSAGE" android:protectionLevel="0x2" /> <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" /> <uses-permission android:name="com.hdl.onpro.push.sdk.permission.EZVIZ_MESSAGE" /> <uses-permission android:name="com.hdl.onpro.permission.C2D_MESSAGE" /> <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> </manifest> HDL_ON/Entity/Function/Scene.cs
@@ -729,6 +729,7 @@ /// <summary> /// 属性的值列表 /// </summary> [Newtonsoft.Json.JsonIgnore] public List<string> valueList = new List<string>(); /// <summary> /// 属性名称显示文本 @@ -794,6 +795,7 @@ return text; } [Newtonsoft.Json.JsonIgnore] public string UintString = ""; /// <summary> HDL_ON/Entity/Function/Sensor.cs
@@ -1,5 +1,7 @@ using System; using System.Collections.Generic; using Newtonsoft.Json.Linq; using Shared; namespace HDL_ON.Entity { @@ -82,24 +84,29 @@ function.SetAttrState(FunctionAttributeKey.Value, value); } List<string> _intervalValue = new List<string>(); public void SetIntervalValue(List<string> intervalValue) { _intervalValue = intervalValue; } /// <summary> /// 每个等级对区间值 /// </summary> public List<string> GetIntervalValue(string spk) public List<string> GetIntervalValue(Function function) { //if (_intervalValue.Count != 0) //{ // return _intervalValue; //} _intervalValue = new List<string>(); switch (spk) List<string> _intervalValue = new List<string>(); if (function.attrKeyConfigs.Count > 0) { foreach (var attrKey in function.attrKeyConfigs) { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) { foreach (var info in attrKey.configs) { _intervalValue.Add(info.start + " ~ " + info.end); } return _intervalValue; } } } switch (function.spk) { case SPK.SensorPm25: _intervalValue.Add("0 ~ 50"); @@ -155,7 +162,6 @@ if (function.attrKeyConfigs.Count > 0) { foreach (var attrKey in function.attrKeyConfigs) { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) @@ -175,7 +181,7 @@ unit = "°C"; break; case SPK.SensorTVOC: unit = "PPB"; unit = "mg/m³"; break; case SPK.SensorCO2: unit = "PPM"; @@ -194,10 +200,25 @@ /// <summary> /// 每个等级的颜色值 /// </summary> public List<uint> GetLevelColorList(string spk) public List<uint> GetLevelColorList(Function function) { var _levelColorList = new List<uint>(); switch (spk) if (function.attrKeyConfigs.Count > 0) { foreach (var attrKey in function.attrKeyConfigs) { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) { foreach (var info in attrKey.configs) { _levelColorList.Add(Convert.ToUInt32(info.color, 16)); } return _levelColorList; } } } switch (function.spk) { case SPK.SensorPm25: _levelColorList.Add(0xFFADE764); @@ -251,53 +272,69 @@ /// <summary> /// 每个等级的名称 /// </summary> public List<int> GetLevelTextList(string spk) public List<string> GetLevelTextList(Function function) { var _levelTextList = new List<int>(); switch (spk) var _levelTextList = new List<string>(); if (function.attrKeyConfigs.Count > 0) { foreach (var attrKey in function.attrKeyConfigs) { if (function.spk.Replace(".", "").Contains(attrKey.key.Replace(".", ""))) { foreach (var info in attrKey.configs) { _levelTextList.Add(info.desc); } return _levelTextList; } } } switch (function.spk) { case SPK.SensorPm25: case SPK.SensorPm10: _levelTextList.Add(StringId.Great); _levelTextList.Add(StringId.Good); _levelTextList.Add(StringId.MildPollution); _levelTextList.Add(StringId.HeavyPollution); _levelTextList.Add(Language.StringByID(StringId.Great)); _levelTextList.Add(Language.StringByID(StringId.Good)); _levelTextList.Add(Language.StringByID(StringId.MildPollution)); _levelTextList.Add(Language.StringByID(StringId.HeavyPollution)); break; case SPK.SensorCO2: _levelTextList.Add(StringId.SensorReferenceTipCO2Level1); _levelTextList.Add(StringId.SensorReferenceTipCO2Level2); _levelTextList.Add(StringId.SensorReferenceTipCO2Level3); _levelTextList.Add(StringId.SensorReferenceTipCO2Level4); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level1)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level2)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level3)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTipCO2Level4)); break; case SPK.SensorTemperature: _levelTextList.Add(StringId.ExtremelyCold); _levelTextList.Add(StringId.Cold); _levelTextList.Add(StringId.SlightlyCold); _levelTextList.Add(StringId.Comfortable); _levelTextList.Add(StringId.TepidFever); _levelTextList.Add(StringId.Heat_SensorTip); _levelTextList.Add(StringId.ExtremeHeat); _levelTextList.Add(Language.StringByID(StringId.ExtremelyCold)); _levelTextList.Add(Language.StringByID(StringId.Cold)); _levelTextList.Add(Language.StringByID(StringId.SlightlyCold)); _levelTextList.Add(Language.StringByID(StringId.Comfortable)); _levelTextList.Add(Language.StringByID(StringId.TepidFever)); _levelTextList.Add(Language.StringByID(StringId.Heat_SensorTip)); _levelTextList.Add(Language.StringByID(StringId.ExtremeHeat)); break; case SPK.SensorTVOC: _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel1); _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel2); _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel3); _levelTextList.Add(StringId.SensorReferenceTVOCTipLevel4); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel1)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel2)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel3)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceTVOCTipLevel4)); break; case SPK.SensorHumidity: _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel1); _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel2); _levelTextList.Add(StringId.SensorReferenceHumidityTipLevel3); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel1));//潮湿 _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel2)); _levelTextList.Add(Language.StringByID(StringId.SensorReferenceHumidityTipLevel3));//干燥 break; case SPK.SensorHcho: _levelTextList.Add(StringId.Class_I_BuildingStandard); _levelTextList.Add(StringId.SecondaryBuildingStandard); _levelTextList.Add(StringId.ExceedingTheStandard); _levelTextList.Add(Language.StringByID(StringId.Class_I_BuildingStandard)); _levelTextList.Add(Language.StringByID(StringId.SecondaryBuildingStandard)); _levelTextList.Add(Language.StringByID(StringId.ExceedingTheStandard)); break; default: _levelTextList.Add(99999999); _levelTextList.Add(99999999); _levelTextList.Add(99999999); _levelTextList.Add(""); _levelTextList.Add(""); _levelTextList.Add(""); break; } return _levelTextList; @@ -390,7 +427,7 @@ } foreach (var info in attrKey.configs) { if ((Convert.ToDouble(info.start) < values) && (Convert.ToDouble(info.end) >= values)) if ((Convert.ToDouble(info.start) <= values) && (Convert.ToDouble(info.end) >= values)) { return level; } @@ -468,6 +505,10 @@ else level = 3; break; default: level = 1; break; } return level; } HDL_ON/Entity/Room.cs
@@ -508,6 +508,7 @@ { if (g.roomIds.Contains(roomId) && roomId != null) { g.deviceId = g.userDeviceGroupControlId; functions.Add(g); } } HDL_ON/HDL_ON.projitems
@@ -594,6 +594,8 @@ <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Automation\Constant.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneAutomationListChoosePage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)UI\UI2\3-Intelligence\Scene\SceneTargetTypeChoosePage.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogClient.cs" /> <Compile Include="$(MSBuildThisFileDirectory)Common\AliyunLog\AliyunLogInvokeAsync.cs" /> </ItemGroup> <ItemGroup> <Folder Include="$(MSBuildThisFileDirectory)Entity\Device\" /> @@ -627,5 +629,6 @@ <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\CommonView\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\Aks\Entity\" /> <Folder Include="$(MSBuildThisFileDirectory)UI\UI2\FuntionControlView\HisenseTV \" /> <Folder Include="$(MSBuildThisFileDirectory)Common\AliyunLog\" /> </ItemGroup> </Project> HDL_ON/UI/MainPage.cs
@@ -26,7 +26,7 @@ /// <summary> /// 版本号 /// </summary> public static string VersionString = "2.4.3"; public static string VersionString = "2.4.8"; ///// <summary> ///// 客户端类型 ///// </summary> @@ -650,6 +650,14 @@ #if DEBUG Console.WriteLine($"{tag}-->{msg}"); #endif if (tag == "error") { new System.Threading.Thread(async () => { await Common.AliyunLog.AliyunLogClient.PostLogs("自定义Error日志", msg); }) { IsBackground = true }.Start(); } } HDL_ON/UI/UI0-Public/PublicAssmeblyBLL.cs
@@ -169,7 +169,7 @@ break; case SPK.MusicStandard: case SPK.AvMusic: Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function };//当前播放器 Music.A31MusicModel.Current = new Music.A31MusicModel { functionMusic = function ,LastDateTime = DateTime.Now};//当前播放器 var a31PlayMusicPage = new Music.A31PlayMusicPage(); MainPage.BasePageView.AddChidren(a31PlayMusicPage); a31PlayMusicPage.Show(); HDL_ON/UI/UI0-Stan/Logic/HdlMessageLogic.cs
@@ -89,7 +89,14 @@ form.AddForm(string.Empty); form.SetTextContent(msg); }, "ok"); }, "ok"); //上报日志服务器 new System.Threading.Thread(async () => { await Common.AliyunLog.AliyunLogClient.PostLogs("App程序错误", ex.Message + "\r\n" + ex.StackTrace); }) { IsBackground = true }.Start(); } /// <summary> @@ -104,7 +111,13 @@ form.AddForm(string.Empty); form.SetTextContent(msg); }, "ok"); }, "ok"); //上报日志服务器 new System.Threading.Thread(async () => { await Common.AliyunLog.AliyunLogClient.PostLogs("App程序错误", msg); }) { IsBackground = true }.Start(); } HDL_ON/UI/UI1-Login/LoginPage.cs
@@ -294,98 +294,62 @@ //return; if (b) { //etAccount.Text = "1033326940@qq.com"; //etAccount.Text = "18022428438";//wjc //etAccount.Text = "13602944661";//kx //etAccount.Text = "13226233133";//豆豆 //etAccount.Text = "18316120654";//tujie //etAccount.Text = "13450425807";//黄竹溪 knx项目 //etAccount.Text = "tf@smarttech.com.ua"; //etAccount.Text = "455740454@qq.com"; //etAccount.Text = "18688565449"; //etAccount.Text = "18570064522"; //etAccount.Text = "18718417827"; //etAccount.Text = "18188019284"; //etAccount.Text = "13143792049"; //etAccount.Text = "13288623489";//罗晓东 //etAccount.Text = "18244942707"; //etAccount.Text = "13143792049"; etAccount.Text = "18688414428";//天河3楼 //etAccount.Text = "13418062953"; etAccount.Text = "13138683659"; //etAccount.Text = "15217626103"; //etAccount.Text = "18100573477"; //etAccount.Text = "18321091245"; //etAccount.Text = "13751916353"; etAccount.Text = "13549566666"; etAccount.Text = "13375012446";//测试服务器 etAccount.Text = "15855403939"; etAccount.Text = "15006564444"; etAccount.Text = "pjh@hdlchina.com.cn"; //etAccount.Text = "18688414428";//天河3楼 //etAccount.Text = "pjh@hdlchina.com.cn"; //etAccount.Text = "12345678904";//2.0 测试 萤石 etAccount.Text = "18316672920"; etAccount.Text = "18244942707"; etAccount.Text = "1272061968@qq.com";//万科城市之光E区8栋206 etAccount.Text = "13533335801"; etAccount.Text = "13682244600"; etAccount.Text = "marketing@australindo.co.id"; etAccount.Text = "support7@hdlautomation.com"; etAccount.Text = "13922115008";//刘总 etAccount.Text = "1272061968@qq.com"; etAccount.Text = "support7@hdlautomation.com"; etAccount.Text = "info@hdlegypt.com"; //etAccount.Text = "1272061968@qq.com";//万科城市之光E区8栋206 //etAccount.Text = "marketing@australindo.co.id"; //etAccount.Text = "13922115008";//刘总 //etAccount.Text = "support7@hdlautomation.com"; etAccount.Text = "13336018868"; etAccount.Text = "13435693712"; } else { //etAccount.Text = "464027401@qq.com";// //etAccount.Text = "15217626103";// etAccount.Text = "13168123446";//昆明金茂项目,新风问题 //etAccount.Text = "13168123446";//昆明金茂项目,新风问题 //etAccount.Text = "2949126848@qq.com";//陈琳 etAccount.Text = "15014291819 "; //etAccount.Text = "13676202754";//巴林服务器 //etAccount.Text = "13602944661";//kx //etAccount.Text = "18666455392";//13375012446//13602944661//tzy 18778381374 //etAccount.Text = "15971583093";//高胜 //etAccount.Text = "15217626103";//昆明金茂项目 //etAccount.Text = "18598273624"; //etAccount.Text = "tf@smarttech.com.ua"; //etAccount.Text = "18814122445";//董泽斌 天河办公室 //etAccount.Text = "18824864143";//"464027401@qq.com"; //"2791308028@qq.com";//13697499568 //etAccount.Text = "13430286286";//cwc //etAccount.Text = "13709260805"; //etAccount.Text = "support5@hdlchina.com.cn"; //etAccount.Text = "13375012441"; //etAccount.Text = "info@smartlife-ks.com"; //etAccount.Text = "551775569@qq.com";//wcf etAccount.Text = "15626203746"; //etAccount.Text = "zhangquansongjava@163.com"; //etAccount.Text = "s.savinov@hdlautomation.ru"; } b = !b; etPassword.Text = "123456"; if(etAccount.Text == "info@hdlegypt.com") if(etAccount.Text == "13336018868") { etPassword.Text = "@Hdl2020"; etPassword.Text = "zzy20020928"; } else if(etAccount.Text == "18600200915") else if(etAccount.Text == "13435693712") { etPassword.Text = "ZJtiaoshi"; etPassword.Text = "a123456"; }else if(etAccount.Text == "13288623489") { etPassword.Text = "luoxiaodong"; }else if(etAccount.Text == "18688414428") }else if(etAccount.Text == "15014291819") { etPassword.Text = "HDL1985000"; }else if (etAccount.Text == "15855403939") etPassword.Text = "hdl123456"; }else if (etAccount.Text == "15262988048") { etPassword.Text = "yyr123456"; etPassword.Text = "15262988048"; } else if (etAccount.Text == "18100573477") else if (etAccount.Text == "649362315@qq.com") { etPassword.Text = "huang12345"; etPassword.Text = "aa123456"; }else if(etAccount.Text == "dcai.assist@gmail.com") { etPassword.Text = "GraniteTileS57"; @@ -557,6 +521,7 @@ PlaceholderText = Language.StringByID(StringId.PlsEntryPassword), SecureTextEntry = true, TextAlignment = TextAlignment.CenterLeft, }; passwordView.AddChidren(etPassword); @@ -1113,17 +1078,17 @@ new FunctionAttributes(){ key = AcstParent_AttrEnum.month_electricity.ToString(),curValue = "999",state = "999"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.total_electricity.ToString(),curValue = "9999",state = "9999"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.active_power.ToString(),curValue = "9999",state = "9999"}, //new FunctionAttributes(){ key = AcstParent_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, //new FunctionAttributes(){ key = AcstParent_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, //new FunctionAttributes(){ key = AcstParent_AttrEnum.co2.ToString(),curValue = "266",state = "266"}, //new FunctionAttributes(){ key = AcstParent_AttrEnum.tvoc.ToString(),curValue = "666",state = "666"}, //new FunctionAttributes(){ key = AcstParent_AttrEnum.pm25.ToString(),curValue = "36",state = "36"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.room_temp.ToString(),curValue = "26",state = "26"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.room_humidity.ToString(),curValue = "66",state = "66"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.co2.ToString(),curValue = "266",state = "266"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.tvoc.ToString(),curValue = "666",state = "666"}, new FunctionAttributes(){ key = AcstParent_AttrEnum.pm25.ToString(),curValue = "36",state = "36"}, } }); FunctionList.List.Functions.Add(new Function { name = "测试-空调科技系统子控-1", name = "子控-1", spk = SPK.AcstSub, sid = "0000001", attributes = new List<FunctionAttributes>() @@ -1136,7 +1101,7 @@ }); FunctionList.List.Functions.Add(new Function { name = "测试-空调科技系统子控-2", name = "子控-2", spk = SPK.AcstSub, sid = "0000002", attributes = new List<FunctionAttributes>() @@ -1149,7 +1114,7 @@ }); FunctionList.List.Functions.Add(new Function { name = "测试-空调科技系统子控-3", name = "子控-3", spk = SPK.AcstSub, sid = "0000003", attributes = new List<FunctionAttributes>() @@ -1162,7 +1127,7 @@ }); FunctionList.List.Functions.Add(new Function { name = "测试-空调科技系统子控-4", name = "子控-4", spk = SPK.AcstSub, sid = "0000004", attributes = new List<FunctionAttributes>() @@ -1175,7 +1140,7 @@ }); FunctionList.List.Functions.Add(new Function { name = "测试-空调科技系统子控-5", name = "子控-5", spk = SPK.AcstSub, sid = "0000005", attributes = new List<FunctionAttributes>() HDL_ON/UI/UI2/1-HomePage/HomePage.cs
@@ -444,7 +444,7 @@ SelectedImagePath = "Collection/DefenseStatusIcon.png", UnSelectedImagePath = "Collection/DisarmStatusIcon.png" }; if (DB_ResidenceData.Instance.GatewayType == 1) if (DB_ResidenceData.Instance.GatewayType == 1 && !DB_ResidenceData.Instance.CurrentRegion.isOtherShare) { topView.AddChidren(btnSecurityStatus); @@ -502,6 +502,10 @@ UnSelectedImagePath = "Collection/MsgIcon.png", SelectedImagePath = "Collection/MsgIconTip.png", }; if(btnSecurityStatus.Parent == null) { btnMsgIcon.X = Application.GetRealWidth(329); } topView.AddChidren(btnMsgIcon); @@ -549,6 +553,17 @@ LoadContentView(); #endregion #if DEBUG btnResidenceName.MouseUpEventHandler = (envent, ee) => { MainPage.Log("sss"); new System.Threading.Thread(async() => { await Common.AliyunLog.AliyunLogClient.PostLogs("告警测试", "测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息测试信息"); }) { IsBackground = true }.Start(); }; #endif } catch (Exception ex) { HDL_ON/UI/UI2/2-Classification/ClassificationPage.cs
@@ -748,7 +748,7 @@ case ShowFunction.SecurityMonitoring: if (!MainPage.NoLoginMode) { if (OnAppConfig.Instance.RequestHttpsHost.Contains("bahrain")) if (OnAppConfig.Instance.RequestHttpsHost.Contains("bahrain") || !Common.ApiUtlis.Ins.hadInternet) { functionCount = 0; } @@ -775,10 +775,16 @@ functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.trait_on_off.curValue.ToString() == "on").Count; break; case ShowFunction.VideoDoorLock: functionCount = FunctionList.List.GetVideoDoorLockList().Count; functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.GetAttrState("status").ToString() == "open" || obj.GetAttrState("status").ToString() == "normal_open").Count; if (Common.ApiUtlis.Ins.hadInternet) { functionCount = FunctionList.List.GetVideoDoorLockList().Count; functionOnCount = FunctionList.List.GetAcstParentList().FindAll((obj) => obj.GetAttrState("status").ToString() == "open" || obj.GetAttrState("status").ToString() == "normal_open").Count; } else { functionCount = 0; } break; case ShowFunction.Aks: functionCount = FunctionList.List.GetVideoControlsList().Count; @@ -1479,7 +1485,7 @@ //#if __Android__ //适配沉浸式导航栏 h5BasePage.Y = Application.GetRealHeight(20); h5BasePage.Y = Application.GetRealHeight(35); h5BasePage.Height = Application.GetRealHeight(646); //#endif MainPage.BasePageView.AddChidren(h5BasePage); HDL_ON/UI/UI2/2-Classification/ClassificationPageBLL.cs
@@ -231,6 +231,10 @@ }; foreach (var f in room.GetRoomFunctions(false)) { //if(f.spk == SPK.OtherCommon) //{ // continue; //} if (f.trait_on_off.curValue.ToString() == "on") { btn.Visible = true; @@ -385,6 +389,16 @@ System.Threading.Thread.Sleep(sleepTime); } break; case ShowFunction.MechanicalArm: foreach (var f in FunctionList.List.GetMechanicalArmList()) { f.trait_on_off.curValue = onoff; Dictionary<string, string> d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, f.trait_on_off.curValue.ToString()); Control.Ins.SendWriteCommand(f, d); System.Threading.Thread.Sleep(sleepTime); } break; } } else @@ -423,6 +437,14 @@ } Control.Ins.SwtichFunctions(onoff == "on", eleList); break; case ShowFunction.MechanicalArm: List<Function> meArmList = new List<Function>(); foreach (var f in FunctionList.List.GetMechanicalArmList()) { meArmList.Add(f); } Control.Ins.SwtichFunctions(onoff == "on", meArmList); break; } HDL_ON/UI/UI2/2-Classification/FunctionControlZoneBLL.cs
@@ -86,16 +86,18 @@ btnSwitch.MouseUpEventHandler = (sender, e) => { if (!function.isOnline())//离线不允许操作 { new Tip() { CloseTime = 1, Text = Language.StringByID(StringId.DeviceOfflineCannotOption), Direction = AMPopTipDirection.None, }.Show(MainPage.BaseView); return; } //DriverLayer.Control.Ins.GatewayOnline_Cloud = false; //DriverLayer.Control.Ins.GatewayOnline_Local = true; //if (!function.isOnline())//离线不允许操作 //{ // new Tip() // { // CloseTime = 1, // Text = Language.StringByID(StringId.DeviceOfflineCannotOption), // Direction = AMPopTipDirection.None, // }.Show(MainPage.BaseView); // return; //} btnSwitch.IsSelected = !btnSwitch.IsSelected; if(SPK.NotStatusSpkList.Contains( function.spk )) HDL_ON/UI/UI2/3-Intelligence/Automation/InpOrOutLogicMethod.cs
@@ -2951,7 +2951,8 @@ { //因为调试软件上传为空过; string intTimeValue = string.IsNullOrEmpty(strTimeValue) ? "0" : strTimeValue; var timeValue = int.Parse(intTimeValue); int timeValue = 0; int.TryParse(intTimeValue,out timeValue); string state = ""; var minutes = timeValue / 60; var seconds = timeValue % 60; HDL_ON/UI/UI2/3-Intelligence/Automation/Send.cs
@@ -61,7 +61,14 @@ { return null; } var dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicIdData>>(responsePackNew.Data.ToString()); List<LogicIdData> dateList = new List<LogicIdData>(); try { dateList = Newtonsoft.Json.JsonConvert.DeserializeObject<List<LogicIdData>>(responsePackNew.Data.ToString()); }catch (Exception ex) { MainPage.Log($"获取逻辑ID列表异常:{ex.Message}"); } return dateList; } /// <summary> @@ -572,7 +579,7 @@ /// <param name="api_Url">请求地址(不是绝对地址)</param> /// <param name="tag">标记->描述接口(自定义)</param> /// <returns></returns> public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag,int mTimeout = 3) public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag,int mTimeout = 8) { Log($"{DateTime.Now}->发送->{tag}", api_Url,o.ToString()); var requestJson = HttpUtil.GetSignRequestJson(o); HDL_ON/UI/UI2/3-Intelligence/Automation/TargetDeviceFunList.cs
@@ -759,14 +759,40 @@ ///设备延时iewv DelayView(fLayout, volView.frameLayout.Bottom); var delayView = DelayView(fLayout, volView.frameLayout.Bottom); if (edit ) { Output outputs = Logic.currlogic.output[index]; var dicList = outputs.status.Find((obj) => obj.ContainsValue(FunctionAttributeKey.OnOff)); if (dicList != null) { if (dicList.ContainsValue( "off") || dicList.ContainsValue("pause")) { funTypeView.frameLayout.Visible = false; volView.frameLayout.Visible = false; delayView.frameLayout.Y = switchVie.frameLayout.Bottom; } } } #endregion #region 点击事件 ///开关点击事件 switchVie.btnClick.MouseUpEventHandler += (sender, e) => { SwitchViewMethod(device, switchVie.btnState, 2); SwitchViewMethod(device, switchVie.btnState, 2, (v) => { if (v == "on") { funTypeView.frameLayout.Visible = true; volView.frameLayout.Visible = true; delayView.frameLayout.Y = volView.frameLayout.Bottom; } else { funTypeView.frameLayout.Visible = false; volView.frameLayout.Visible = false; delayView.frameLayout.Y = switchVie.frameLayout.Bottom; } }); }; ///提示语音点击事件 funTypeView.btnClick.MouseUpEventHandler += (sender, e) => @@ -1002,6 +1028,23 @@ dicList.AddRange(diclist);//再添加其它属性 dicSateteList = dicList;//重新赋值 } var onoffDic = dicSateteList.Find((obj) => obj.ContainsValue("on_off")); if (onoffDic != null) { if (onoffDic.ContainsValue("off")) { for(int i =0;i<dicSateteList.Count;) { var d = dicSateteList[i]; if(!d.ContainsValue("on_off") || d.ContainsValue("delay")) { dicSateteList.Remove(d); continue; } i++; } } } } break; case SPK.GroupControl: @@ -1052,7 +1095,7 @@ /// </summary> /// <param name="fLayout">父控件</param> /// <param name="bottomY">在哪个控件下面</param> private void DelayView(FrameLayout fLayout, int bottomY) private LogicView.FunTypeView DelayView(FrameLayout fLayout, int bottomY) { LogicView.FunTypeView delayView = new LogicView.FunTypeView(); delayView.frameLayout.Y = bottomY; @@ -1072,6 +1115,7 @@ selectedState = "delay_" + strdelay; }); }; return delayView; } @@ -1081,7 +1125,8 @@ /// <param name="device"></param> /// <param name="button"></param> /// <param name="len">显示选择View数量</param> private void SwitchViewMethod(Entity.Function device, Button button, int len) /// <param name="action">点击回调事件,用来给音乐刷新界面使用,wxr 2024-01-04 16:03:47</param> private void SwitchViewMethod(Entity.Function device, Button button, int len,Action<string> action = null) { #region 界面 FrameLayout frame = new FrameLayout { BackgroundColor = CSS.CSS_Color.viewTrans60lucence }; @@ -1142,11 +1187,11 @@ } break; } //数据封装 AddDictionary(key, value); action?.Invoke(value); }); #endregion } HDL_ON/UI/UI2/3-Intelligence/IntelligencePage.cs
@@ -727,6 +727,10 @@ { btnAddIcon.MouseUpEventHandler = (sender, e) => { if (btnSecurityTitle != null && btnSecurityTitle.IsSelected) { return; } if (!btnAutomationTitle.IsSelected) { //如果是成员 HDL_ON/UI/UI2/3-Intelligence/Scene/CatchSceneAddPage.cs
@@ -365,7 +365,10 @@ { if (MainPage.SceneSupportFunctionList.Contains(temp.spk)) { catchFunctionList.Add(temp); if (catchFunctionList.Find((obj) => obj.sid == temp.sid && obj.spk == temp.spk) == null) { catchFunctionList.Add(temp); } } } } HDL_ON/UI/UI2/3-Intelligence/Scene/SetSceneFunctionInfoPage.cs
@@ -32,7 +32,7 @@ bodyView = this; scene = s; sceneFunction = fc;//.localFunction.ConvertSceneFunction(); sceneFunction = fc.localFunction.ConvertSceneFunction(); foreach (var ll in sceneFunction.status) { try @@ -248,6 +248,17 @@ if (sceneFunction.localFunction.spk == SPK.MusicStandard) { for (var i = 0; i < sceneFunction.status.Count;) { var ddd = sceneFunction.status[i]; if (string.IsNullOrEmpty(ddd.value)) { sceneFunction.status.Remove(ddd); continue; } i++; } if (sceneFunction.status.Find((obj) => obj.key == FunctionAttributeKey.PlaylistName) == null) { if (isOnStatus) HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/AddGroupControlPage.cs
@@ -422,6 +422,7 @@ new PublicAssmebly().TipMsg(StringId.Tip, StringId.PlsEntryGroupName); return; } groupControl.name = name; if (groupControlLightList.Count < 2) { new PublicAssmebly().TipMsg(StringId.Tip, StringId.PlsSelectMoreData); @@ -429,7 +430,6 @@ } if (isAdd) { groupControl.name = name; groupControl.sids.Clear(); foreach (var light in groupControlLightList) { HDL_ON/UI/UI2/4-PersonalCenter/CombinedDimming/CombinedDimmingListPage.cs
@@ -223,14 +223,13 @@ { Application.RunOnMainThread(() => { //groupControl.roomIds = newGC.roomIds; //groupControl.uids = newGC.uids; var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); var localTemp = FunctionList.List.groupControls.Find((obj) => obj.deviceId == newGC.deviceId); localTemp.roomIds = newGC.roomIds; localTemp.uids = newGC.uids; localTemp.sids = newGC.sids; btnFunctionLocationInfo.Text = newGC.GetUidListName(); localTemp.name = newGC.name; btnFunctionLocationInfo.Text = newGC.GetUidListName(); btnFunctionName.Text = newGC.name; }); } } HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFaceManagementPage.cs
@@ -193,12 +193,12 @@ }; btnMsg1.MouseUpEventHandler += (sender2, e2) => { string url = "https://developer.hdlcontrol.com/人脸信息采集协议.html"; string url = "https://developer.hdlcontrol.com/HDLFaceProtocol.html"; if (Language.CurrentLanguage != "Chinese") { url = "https://developer.hdlcontrol.com/Face information collection protocol.html"; } new WebViewDialog().LoadPage("人脸信息采集协议", url); new WebViewDialog().LoadPage(Language.StringByID(StringId.GetFaceProtocol), url); dialog.Close(); }; HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberFunctionPermissionPage.cs
@@ -79,6 +79,7 @@ this.funs_RoomAll.AddRange(funs_RoomAll); this.funs_Del = new List<ShareData>(); this.refreshAction = refreshAction; this.BackgroundColor = CSS_Color.BackgroundColor; } public void LoadPage(int tId) @@ -240,7 +241,7 @@ /// </summary> public string name; /// <summary> /// 分享类型 1.ROOM 2.DEVICE 3.SCENE /// 分享类型 1.ROOM 2.DEVICE 3.SCENE 4.DEVICE_GROUP_CONTROL /// </summary> public string shareType = ShareType.DEVICE.ToString(); } HDL_ON/UI/UI2/4-PersonalCenter/MemberManagement/MemberPermissionPage.cs
@@ -315,7 +315,7 @@ roomFunctionOrSceneList.Add(new RoomData() { shareTypeId = fun.deviceId, shareType = ShareType.DEVICE.ToString(), shareType = fun.spk == SPK.GroupControl ? "DEVICE_GROUP_CONTROL" : ShareType.DEVICE.ToString(), name = fun.name, }); } HDL_ON/UI/UI2/4-PersonalCenter/PersonalCenterPageBLL.cs
@@ -225,7 +225,31 @@ var regionId = (string)btnHomeName.Tag; dialog.Close(); LoadEvent_ChangeCurHome(home); LoadContentView(); new System.Threading.Thread(() => { try { while (true) { if (Common.ApiUtlis.Ins.DownloadDataComplete) { System.Threading.Thread.Sleep(100); } else { Application.RunOnMainThread(() => { LoadContentView(); }); break; } } } catch { } { } }) { IsBackground = true }.Start(); HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); }; } @@ -409,7 +433,31 @@ var regionId = (string)btnHomeName.Tag; dialog.Close(); LoadEvent_ChangeCurHome(home); LoadContentView(); new System.Threading.Thread(() => { try { while (true) { if (Common.ApiUtlis.Ins.DownloadDataComplete) { System.Threading.Thread.Sleep(100); } else { Application.RunOnMainThread(() => { LoadContentView(); }); break; } } } catch { } { } }) { IsBackground = true }.Start(); HDL_ON.UI.UI2.FuntionControlView.VideoDoorLock.CommonMethod.Current.ChangeCurrHome(home); }; } HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/AcControlPage.cs
@@ -446,7 +446,7 @@ d.Add(FunctionAttributeKey.Mode, m); Control.Ins.SendWriteCommand(device, d); dialog.Close(); if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan") if (device.GetAttrState(FunctionAttributeKey.Mode) == "fan" || device.GetAttrState(FunctionAttributeKey.Mode) == "dry") { setTempBar.IsClickable = false; HDL_ON/UI/UI2/FuntionControlView/1ContorlPage/MechanicalArmPage.cs
@@ -154,7 +154,7 @@ { var dic = new Dictionary<string, string>(); dic.Add(FunctionAttributeKey.OnOff, statu); Control.Ins.SendWriteCommand(this.device, dic, true); Control.Ins.SendWriteCommand(this.device, dic); HdlThreadLogic.Current.RunMain(() => { this.btnPictrue.CanClick = true; HDL_ON/UI/UI2/FuntionControlView/ArmCenter/AddInputPage.cs
@@ -174,6 +174,7 @@ inValue = "alarm"; break; case SPK.SensorPir: case SPK.SensorPirHold: inKey = "people_status"; break; case SPK.SensorSmoke: HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/A_EnvironmentalDataCenter.cs
@@ -497,7 +497,7 @@ { if (view.Tag.ToString() == flag) { view.UpdataStatus(flag,updateTemp.sid, sensorAttr.state); view.UpdataStatus(flag,updateTemp, sensorAttr.state); } } @@ -703,14 +703,12 @@ List<Function> sensorList = new List<Function>(); string imagePath = ""; string iconPath = ""; string sensorSPK = ""; Sensor sensorTemp = new Sensor(); double assembleValues = 0.0; public SensorView(List<Function> showList, int index)//,,string spk,double value) { sensorList = showList; sensorSPK = showList[0].spk; foreach (var s in showList) { assembleValues += Convert.ToDouble(s.GetAttrState("value").Replace(",", ".")); @@ -721,7 +719,7 @@ this.Width = Application.GetRealWidth(182); this.Height = Application.GetRealWidth(124); this.Y = Application.GetRealWidth(124 * (index / 2)); this.Tag = sensorSPK; this.Tag = showList[0].spk; if (index % 2 != 0) { @@ -729,7 +727,7 @@ } switch (sensorSPK) switch (showList[0].spk) { case SPK.SensorCO2: imagePath = "FunctionIcon/EnvirSensor/Co2Bg.png"; @@ -794,11 +792,11 @@ this.AddChidren(btnInfoIcon); btnInfoIcon.MouseUpEventHandler = (sender, e) => { LoadInfo(sensorSPK); LoadInfo(sensor); }; var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); var levelTextList = sensorTemp.GetLevelTextList(sensorSPK); var curLevel = sensorTemp.GetCurLevel(sensor); var levelTextList = sensorTemp.GetLevelTextList(sensor); btnLevel = new Button() { X = Application.GetRealWidth(25), @@ -806,9 +804,9 @@ Width = Application.GetRealWidth(100), Height = Application.GetRealWidth(32), TextAlignment = TextAlignment.CenterLeft, TextColor = sensorTemp.GetLevelColorList(sensorSPK)[curLevel - 1], TextColor = sensorTemp.GetLevelColorList(sensor)[curLevel - 1], TextSize = CSS_FontSize.SubheadingFontSize, TextID = levelTextList[curLevel - 1], Text = levelTextList[curLevel - 1], Tag = "SensorLevel", }; this.AddChidren(btnLevel); @@ -853,10 +851,10 @@ /// <summary> /// 加载传感器等级相关信息 /// </summary> void LoadInfo(string sensorSPK) void LoadInfo(Function sensor) { var levelColorList = sensorTemp.GetLevelColorList(sensorSPK); var levelTextList = sensorTemp.GetLevelTextList(sensorSPK); var levelColorList = sensorTemp.GetLevelColorList(sensor); var levelTextList = sensorTemp.GetLevelTextList(sensor); Dialog dialog = new Dialog(); FrameLayout dialogBodyView = new FrameLayout(); @@ -889,7 +887,7 @@ }; infoView.AddChidren(btnTitle); switch (sensorSPK) switch (sensor.spk) { case SPK.SensorPm25: btnTitle.Text = "PM2.5(ug/m³)"; @@ -898,7 +896,7 @@ btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; break; case SPK.SensorTVOC: btnTitle.Text = "TVOC(PPB)"; btnTitle.Text = "TVOC(mg/m³)"; break; case SPK.SensorCO2: btnTitle.Text = "CO2(PPM)"; @@ -973,7 +971,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, Text = sensorTemp.GetIntervalValue(sensorSPK)[index] Text = sensorTemp.GetIntervalValue(sensor)[index] }); subInfoView.AddChidren(new Button() @@ -984,7 +982,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, TextID = levelTextList[index] Text = levelTextList[index] }); subInfoView.AddChidren(new Button() @@ -1019,13 +1017,13 @@ /// 更新状态 /// </summary> /// <param name="updateTemp"></param> public void UpdataStatus(string spk ,string sid,string value) public void UpdataStatus(string spk ,Function function,string value) { try { if (spk == sensorSPK) if (spk == function.spk) { var temp = sensorList.Find((obj) => obj.sid == sid); var temp = sensorList.Find((obj) => obj.sid == function.sid); if(temp!= null) { temp.SetAttrState("value", value); @@ -1035,10 +1033,10 @@ btnSensorValues.Text = assembleValues.ToString(); var curLevel = sensorTemp.GetCurLevel(sensorSPK, assembleValues); var curLevel = sensorTemp.GetCurLevel(function); btnLevel.TextID = sensorTemp.GetLevelTextList(sensorSPK)[curLevel- 1]; btnLevel.TextColor = sensorTemp.GetLevelColorList(sensorSPK)[curLevel - 1]; btnLevel.Text = sensorTemp.GetLevelTextList(temp)[curLevel- 1]; btnLevel.TextColor = sensorTemp.GetLevelColorList(function)[curLevel - 1]; } } catch (Exception ex) HDL_ON/UI/UI2/FuntionControlView/EnvironmentalScience/EnvironmentalPage.cs
@@ -1,5 +1,6 @@ using System; using System.Collections.Generic; using System.Reflection; using HDL_ON.DriverLayer; using HDL_ON.Entity; using HDL_ON.UI.CSS; @@ -348,8 +349,8 @@ /// </summary> void LoadSensorDiv(Function sensor,int index) { var levelColorList = sensorTemp.GetLevelColorList(sensor.spk); var levelTextList = sensorTemp.GetLevelTextList(sensor.spk); var levelColorList = sensorTemp.GetLevelColorList(sensor); var levelTextList = sensorTemp.GetLevelTextList(sensor); { var sensorTag = sensor.spk + sensor.sid + sensor.deviceId; FrameLayout sensorView = new FrameLayout() @@ -511,8 +512,8 @@ } else { btnLevel.TextID = levelTextList[sensorTemp.GetCurLevel(sensor) - 1]; btnLevel.TextColor = sensorTemp.GetLevelColorList(sensor.spk)[sensorTemp.GetCurLevel(sensor) - 1]; btnLevel.Text = levelTextList[sensorTemp.GetCurLevel(sensor) - 1]; btnLevel.TextColor = sensorTemp.GetLevelColorList(sensor)[sensorTemp.GetCurLevel(sensor) - 1]; btnSensorValues.Text = sensor.GetAttrState(FunctionAttributeKey.Value); } } @@ -524,34 +525,34 @@ void LoadInfo(Function sensor) { List<uint> levelColorList = new List<uint>(); List<int> levelTextList = new List<int>(); List<string> levelText = new List<string>(); List<string> levelTextList = new List<string>(); //List<string> levelText = new List<string>(); List<string> intervalList = new List<string>(); var configs = sensor.GetAttrKeyConfigs(sensor.SpkClassification); int i = 0; foreach(var info in configs) //int i = 0; //foreach(var info in configs) //{ // foreach(var config in info.configs) // { // var color = Convert.ToUInt32(config.color,16); // var text = config.desc; // levelColorList.Add(color); // //levelText.Add(text); // levelTextList.Add(i++); // intervalList.Add(config.start + " ~ " + config.end); // } //} //if (levelColorList.Count == 0) { foreach(var config in info.configs) { var color = Convert.ToUInt32(config.color,16); var text = config.desc; levelColorList.Add(color); levelText.Add(text); levelTextList.Add(i++); } } if (levelColorList.Count == 0) { levelColorList = sensorTemp.GetLevelColorList(sensor.spk); levelTextList = sensorTemp.GetLevelTextList(sensor.spk); intervalList = sensorTemp.GetIntervalValue(sensor.spk); foreach (var iii in levelTextList) { levelText.Add(Language.StringByID(iii)); } levelColorList = sensorTemp.GetLevelColorList(sensor); levelTextList = sensorTemp.GetLevelTextList(sensor); intervalList = sensorTemp.GetIntervalValue(sensor); //foreach (var iii in levelTextList) //{ // levelText.Add(Language.StringByID(iii)); //} } Dialog dialog = new Dialog(); @@ -597,7 +598,7 @@ btnTitle.Text = Language.StringByID(StringId.Temp) + "(°C)"; break; case SPK.SensorTVOC: btnTitle.Text = "TVOC(PPB)"; btnTitle.Text = "TVOC(mg/m³)"; break; case SPK.SensorCO2: btnTitle.Text = "CO2(PPM)"; @@ -650,7 +651,7 @@ }); try { for (int index = 0; index < levelText.Count; index++) for (int index = 0; index < levelTextList.Count; index++) { //if(sensorTemp.GetIntervalValue(sensor.spk).Count >= index) //{ @@ -678,7 +679,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, Text = sensorTemp.GetIntervalValue(sensor.spk)[index] Text = intervalList[index] }); subInfoView.AddChidren(new Button() @@ -689,7 +690,7 @@ TextColor = CSS_Color.FirstLevelTitleColor, TextSize = CSS_FontSize.TextFontSize, IsBold = true, Text = levelText[index] Text = levelTextList[index] }); subInfoView.AddChidren(new Button() @@ -967,17 +968,17 @@ { if (updateTemp.spk != SPK.SensorLight) { (btn as Button).TextID = bodyView.sensorTemp.GetLevelTextList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as Button).Text = bodyView.sensorTemp.GetLevelTextList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as Button).TextColor = bodyView.sensorTemp.GetLevelColorList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; } } } } else if (btn.GetType() == typeof(ArcSeekBar)) { (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp.spk)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as ArcSeekBar).ProgressBarColor = bodyView.sensorTemp.GetLevelColorList(updateTemp)[bodyView.sensorTemp.GetCurLevel(updateTemp) - 1]; (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp.spk).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); (btn as ArcSeekBar).Progress = (96 / bodyView.sensorTemp.GetLevelColorList(updateTemp).Count) * bodyView.sensorTemp.GetCurLevel(updateTemp); } } } HDL_ON/UI/UI2/FuntionControlView/HisenseTV /Send.cs
@@ -230,7 +230,7 @@ { if (TipType.flicker == tipType) { if (responsePackNew == null) if (responsePackNew == null || responsePackNew.Code == "-1") { responsePackNew = new ResponsePackNew { message = "没回复,请确认网络是否正常.", Code = "-1", }; } HDL_ON/UI/UI2/FuntionControlView/Light/GroupControlPage_V2.cs
@@ -97,9 +97,6 @@ // function.CollectFunction(); //}; //回退刷新信息事件 new TopViewDiv(bodyView, Language.StringByID(StringId.GroupControl)).LoadTopView_SettingIcon( () => { var page = new AddGroupControlPage(function, @@ -310,18 +307,26 @@ attrView.AddChidren(btnSwitchIcon); btnSwitchIcon.MouseUpEventHandler = (sender, e) => { btnSwitchIcon.IsSelected = !btnSwitchIcon.IsSelected; if (btnSwitchIcon.IsSelected) { var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "off"); function.Control(d); } else { var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "on"); function.Control(d); } else { var d = new Dictionary<string, string>(); d.Add(FunctionAttributeKey.OnOff, "off"); function.Control(d); } }; btnOn.MouseUpEventHandler += (sender, e) => { btnSwitchIcon.IsSelected = true; }; btnOff.MouseUpEventHandler += (sender, e) => { btnSwitchIcon.IsSelected = false; }; } @@ -835,8 +840,8 @@ dimmerBar.OnProgressChangedEvent = (sender, e) => { btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); btnBrightnessText.Text = dimmerBar.Progress + "%"; //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); //btnBrightnessText.Text = dimmerBar.Progress + "%"; return; if (e == 0 && lastBrightness != 0) { @@ -1085,13 +1090,13 @@ btnOn.MouseUpEventHandler += (sender, e) => { dimmerBar.Progress = 100; btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); btnBrightnessText.Text = dimmerBar.Progress + "%"; //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); //btnBrightnessText.Text = dimmerBar.Progress + "%"; }; btnOff.MouseUpEventHandler += (sender, e) => { dimmerBar.Progress = 0; btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); btnBrightnessText.Text = dimmerBar.Progress + "%"; //btnBrightnessText.Y = ((100 - dimmerBar.Progress) * Application.GetRealHeight(222 - 16) / 100); //btnBrightnessText.Text = dimmerBar.Progress + "%"; }; HDL_ON/UI/UI2/FuntionControlView/Music/A31PlayMusicPage.cs
@@ -465,7 +465,7 @@ if (A31MusicModel.Current.functionMusic.GetAttrState(KeyProperty.on_off) == ValueProperty.on) { //音乐在播放时,再计算播放时间(现在时间=原来时间+1秒) playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; //playSecond += (int)(DateTime.Now - A31MusicModel.Current.LastDateTime).TotalSeconds; playSecond += 1;//表示加上等待的时间1s ///歌曲记录暂时时间写入缓存; A31MusicModel.Current.functionMusic.SetAttrState(KeyProperty.playing_time, playSecond); HDL_ON/UI/UI2/FuntionControlView/Music/SendMethod.cs
@@ -325,7 +325,7 @@ /// <param name="api_Url">请求地址(不是绝对地址)</param> /// <param name="tag">标记->描述接口(自定义)</param> /// <returns></returns> public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 15) public ResponsePackNew RequestServerhomeId(object o, string api_Url, string tag, int mTimeout = 10) { JObject jobject = JObject.Parse(Newtonsoft.Json.JsonConvert.SerializeObject(o)); return UI2.Intelligence.Automation.Send.Current.RequestServerhomeId(jobject, api_Url, tag, mTimeout); HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/CommonMethod.cs
@@ -278,7 +278,8 @@ //EZSDK.IOS.EZSDK.Play(info); #else HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, appKey, 1, DB_ResidenceData.Instance.CurrentRegion.id); HDLEzvizSdk.Instance.Init(Application.Activity.Application, ezChildAccessToken, UserInfo.Current.LoginTokenString, UserInfo.Current.RefreshToken, OnAppConfig.Instance.RequestHttpsHost, appKey, 1, DB_ResidenceData.Instance.CurrentRegion.id, HttpUtil.APP_KEY, HttpUtil.SECRET_KEY); #endif HDL_ON/UI/UI2/FuntionControlView/VideoDoorLock/VideoDoorLockPage.cs
@@ -264,6 +264,7 @@ rtvFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/RTV.png"; rtvFL.GetTextButton().TextID = StringId.shishishipin; //临时密码 pswFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); whiteFl.AddChidren(pswFL); @@ -273,6 +274,11 @@ pswFL.AddTextButtonView(); pswFL.GetImageButton().UnSelectedImagePath = "FunctionIcon/DoorLock/OneOpenLock.png"; pswFL.GetTextButton().TextID = StringId.linshimima1; if (device.omodel.Contains("CS-DL30F-V100")) { rtvFL.Visible = rtvFL.Enable = false; pswFL.X = Application.GetRealWidth(26); } //历史记录 recordFL = new CustomFrameLayout(CustomFrameLayout.widthFrameLayout, CustomFrameLayout.heightFrameLayout); @@ -642,11 +648,5 @@ return false; } } } NunitTest-Android/ApiPostTests.cs
New file @@ -0,0 +1,47 @@ using System; using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using NUnit.Framework; namespace NunitTestIos { [TestFixture] public class ApiPostTests { private HttpClient client; private const string apiUrl = "https://api.example.com/"; [SetUp] public void Setup() { client = new HttpClient(); client.BaseAddress = new Uri(apiUrl); } [Test] public async Task TestPostRequest() { // 准备 POST 数据 var postData = new { key = "value" }; var json = JsonConvert.SerializeObject(postData); var content = new StringContent(json, Encoding.UTF8, "application/json"); // 发起 POST 请求 HttpResponseMessage response = await client.PostAsync("endpoint", content); // 验证状态码 Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); // 验证返回的数据或响应内容 string responseBody = await response.Content.ReadAsStringAsync(); Assert.IsTrue(!string.IsNullOrEmpty(responseBody)); // 可以进一步验证返回的数据是否符合预期 } } } NunitTest-Android/Assets/AboutAssets.txt
New file @@ -0,0 +1,19 @@ Any raw assets you want to be deployed with your application can be placed in this directory (and child directories) and given a Build Action of "AndroidAsset". These files will be deployed with your package and will be accessible using Android's AssetManager, like this: public class ReadAsset : Activity { protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); InputStream input = Assets.Open ("my_asset.txt"); } } Additionally, some Android functions will automatically load asset files: Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf"); NunitTest-Android/MainActivity.cs
New file @@ -0,0 +1,24 @@ using System.Reflection; using Android.App; using Android.OS; using Xamarin.Android.NUnitLite; namespace NunitTest_Android { [Activity(Label = "@string/app_name", MainLauncher = true)] public class MainActivity : TestSuiteActivity { protected override void OnCreate(Bundle bundle) { // tests can be inside the main assembly AddTest(Assembly.GetExecutingAssembly()); // or in any reference assemblies // AddTest (typeof (Your.Library.TestClass).Assembly); // Once you called base.OnCreate(), you cannot add more assemblies. base.OnCreate(bundle); } } } NunitTest-Android/NunitTest-Android.csproj
New file @@ -0,0 +1,101 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <ProjectGuid>{7E89ABBF-1E2C-4FE7-AA1B-6599EB4856A2}</ProjectGuid> <TemplateGuid>{7BB5766D-53A1-4A5D-8618-7602F8FCD9B8}</TemplateGuid> <OutputType>Library</OutputType> <RootNamespace>NunitTest_Android</RootNamespace> <AssemblyName>NunitTest_Android</AssemblyName> <Deterministic>True</Deterministic> <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> <AndroidResgenClass>Resource</AndroidResgenClass> <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile> <AndroidApplication>True</AndroidApplication> <AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest> <IsAppExtension>true</IsAppExtension> <TargetFrameworkVersion>v13.0</TargetFrameworkVersion> <AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent> <AndroidUseAapt2>true</AndroidUseAapt2> <AndroidHttpClientHandlerType>Xamarin.Android.Net.AndroidClientHandler</AndroidHttpClientHandlerType> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DebugSymbols>True</DebugSymbols> <DebugType>portable</DebugType> <Optimize>False</Optimize> <OutputPath>bin\Debug</OutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AndroidLinkMode>None</AndroidLinkMode> <ConsolePause>False</ConsolePause> <EmbedAssembliesIntoApk>False</EmbedAssembliesIntoApk> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> <DebugSymbols>True</DebugSymbols> <DebugType>portable</DebugType> <Optimize>True</Optimize> <OutputPath>bin\Release</OutputPath> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <AndroidUseSharedRuntime>False</AndroidUseSharedRuntime> <ConsolePause>False</ConsolePause> <EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="Mono.Android" /> </ItemGroup> <ItemGroup> <Compile Include="MainActivity.cs" /> <Compile Include="TestsSample.cs" /> <Compile Include="Resources\Resource.designer.cs" /> <Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="ApiPostTests.cs" /> </ItemGroup> <ItemGroup> <None Include="Resources\AboutResources.txt" /> <None Include="Assets\AboutAssets.txt" /> <None Include="Properties\AndroidManifest.xml" /> </ItemGroup> <ItemGroup> <AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher.xml" /> <AndroidResource Include="Resources\mipmap-anydpi-v26\ic_launcher_round.xml" /> <AndroidResource Include="Resources\mipmap-hdpi\ic_launcher.png" /> <AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-hdpi\ic_launcher_round.png" /> <AndroidResource Include="Resources\mipmap-mdpi\ic_launcher.png" /> <AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-mdpi\ic_launcher_round.png" /> <AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher.png" /> <AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-xhdpi\ic_launcher_round.png" /> <AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher.png" /> <AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-xxhdpi\ic_launcher_round.png" /> <AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher.png" /> <AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_foreground.png" /> <AndroidResource Include="Resources\mipmap-xxxhdpi\ic_launcher_round.png" /> <AndroidResource Include="Resources\values\colors.xml" /> <AndroidResource Include="Resources\values\ic_launcher_background.xml" /> <AndroidResource Include="Resources\values\strings.xml" /> </ItemGroup> <ItemGroup> <PackageReference Include="Xamarin.Legacy.NUnitLite" Version="0.0.1-alpha" /> <PackageReference Include="Newtonsoft.Json"> <Version>13.0.3</Version> </PackageReference> <PackageReference Include="System.Net.Http"> <Version>4.3.4</Version> </PackageReference> <PackageReference Include="NUnit"> <Version>4.0.1</Version> </PackageReference> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> </Project> NunitTest-Android/Properties/AndroidManifest.xml
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="1" android:versionName="1.0" package="com.companyname.NunitTest_Android"> <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" /> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true"></application> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> </manifest> NunitTest-Android/Properties/AssemblyInfo.cs
New file @@ -0,0 +1,27 @@ using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Android.App; // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("NunitTest_Android")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NunitTest_Android")] [assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision [assembly: AssemblyVersion("1.0.0.0")] [assembly: AssemblyFileVersion("1.0.0.0")] NunitTest-Android/Resources/AboutResources.txt
New file @@ -0,0 +1,44 @@ Images, layout descriptions, binary blobs and string dictionaries can be included in your application as resource files. Various Android APIs are designed to operate on the resource IDs instead of dealing with images, strings or binary blobs directly. For example, a sample Android app that contains a user interface layout (main.xml), an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png) would keep its resources in the "Resources" directory of the application: Resources/ drawable/ icon.png layout/ main.xml values/ strings.xml In order to get the build system to recognize Android resources, set the build action to "AndroidResource". The native Android APIs do not operate directly with filenames, but instead operate on resource IDs. When you compile an Android application that uses resources, the build system will package the resources for distribution and generate a class called "R" (this is an Android convention) that contains the tokens for each one of the resources included. For example, for the above Resources layout, this is what the R class would expose: public class R { public class drawable { public const int icon = 0x123; } public class layout { public const int main = 0x456; } public class strings { public const int first_string = 0xabc; public const int second_string = 0xbcd; } } You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main to reference the layout/main.xml file, or R.strings.first_string to reference the first string in the dictionary file values/strings.xml. NunitTest-Android/Resources/Resource.designer.cs
New file @@ -0,0 +1,234 @@ #pragma warning disable 1591 //------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:4.0.30319.42000 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ [assembly: global::Android.Runtime.ResourceDesignerAttribute("NunitTest_Android.Resource", IsApplication=true)] namespace NunitTest_Android { [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.2.120")] public partial class Resource { static Resource() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } public static void UpdateIdValues() { global::Xamarin.Android.NUnitLite.Resource.Id.CreditsButton = global::NunitTest_Android.Resource.Id.CreditsButton; global::Xamarin.Android.NUnitLite.Resource.Id.OptionHostName = global::NunitTest_Android.Resource.Id.OptionHostName; global::Xamarin.Android.NUnitLite.Resource.Id.OptionPort = global::NunitTest_Android.Resource.Id.OptionPort; global::Xamarin.Android.NUnitLite.Resource.Id.OptionRemoteServer = global::NunitTest_Android.Resource.Id.OptionRemoteServer; global::Xamarin.Android.NUnitLite.Resource.Id.OptionsButton = global::NunitTest_Android.Resource.Id.OptionsButton; global::Xamarin.Android.NUnitLite.Resource.Id.ResultFullName = global::NunitTest_Android.Resource.Id.ResultFullName; global::Xamarin.Android.NUnitLite.Resource.Id.ResultMessage = global::NunitTest_Android.Resource.Id.ResultMessage; global::Xamarin.Android.NUnitLite.Resource.Id.ResultResultState = global::NunitTest_Android.Resource.Id.ResultResultState; global::Xamarin.Android.NUnitLite.Resource.Id.ResultRunSingleMethodTest = global::NunitTest_Android.Resource.Id.ResultRunSingleMethodTest; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsFailed = global::NunitTest_Android.Resource.Id.ResultsFailed; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsId = global::NunitTest_Android.Resource.Id.ResultsId; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsIgnored = global::NunitTest_Android.Resource.Id.ResultsIgnored; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsInconclusive = global::NunitTest_Android.Resource.Id.ResultsInconclusive; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsMessage = global::NunitTest_Android.Resource.Id.ResultsMessage; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsPassed = global::NunitTest_Android.Resource.Id.ResultsPassed; global::Xamarin.Android.NUnitLite.Resource.Id.ResultsResult = global::NunitTest_Android.Resource.Id.ResultsResult; global::Xamarin.Android.NUnitLite.Resource.Id.ResultStackTrace = global::NunitTest_Android.Resource.Id.ResultStackTrace; global::Xamarin.Android.NUnitLite.Resource.Id.RunEverythingButton = global::NunitTest_Android.Resource.Id.RunEverythingButton; global::Xamarin.Android.NUnitLite.Resource.Id.RunTestsButton = global::NunitTest_Android.Resource.Id.RunTestsButton; global::Xamarin.Android.NUnitLite.Resource.Id.TestSuiteListView = global::NunitTest_Android.Resource.Id.TestSuiteListView; global::Xamarin.Android.NUnitLite.Resource.Layout.options = global::NunitTest_Android.Resource.Layout.options; global::Xamarin.Android.NUnitLite.Resource.Layout.results = global::NunitTest_Android.Resource.Layout.results; global::Xamarin.Android.NUnitLite.Resource.Layout.Runner = global::NunitTest_Android.Resource.Layout.Runner; global::Xamarin.Android.NUnitLite.Resource.Layout.test_result = global::NunitTest_Android.Resource.Layout.test_result; global::Xamarin.Android.NUnitLite.Resource.Layout.test_suite = global::NunitTest_Android.Resource.Layout.test_suite; } public partial class Attribute { static Attribute() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Attribute() { } } public partial class Color { // aapt resource value: 0x7F010000 public const int colorAccent = 2130771968; // aapt resource value: 0x7F010001 public const int colorPrimary = 2130771969; // aapt resource value: 0x7F010002 public const int colorPrimaryDark = 2130771970; // aapt resource value: 0x7F010003 public const int ic_launcher_background = 2130771971; static Color() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Color() { } } public partial class Id { // aapt resource value: 0x7F020000 public const int CreditsButton = 2130837504; // aapt resource value: 0x7F020001 public const int OptionHostName = 2130837505; // aapt resource value: 0x7F020002 public const int OptionPort = 2130837506; // aapt resource value: 0x7F020003 public const int OptionRemoteServer = 2130837507; // aapt resource value: 0x7F020004 public const int OptionsButton = 2130837508; // aapt resource value: 0x7F020005 public const int ResultFullName = 2130837509; // aapt resource value: 0x7F020006 public const int ResultMessage = 2130837510; // aapt resource value: 0x7F020007 public const int ResultResultState = 2130837511; // aapt resource value: 0x7F020008 public const int ResultRunSingleMethodTest = 2130837512; // aapt resource value: 0x7F02000A public const int ResultsFailed = 2130837514; // aapt resource value: 0x7F02000B public const int ResultsId = 2130837515; // aapt resource value: 0x7F02000C public const int ResultsIgnored = 2130837516; // aapt resource value: 0x7F02000D public const int ResultsInconclusive = 2130837517; // aapt resource value: 0x7F02000E public const int ResultsMessage = 2130837518; // aapt resource value: 0x7F02000F public const int ResultsPassed = 2130837519; // aapt resource value: 0x7F020010 public const int ResultsResult = 2130837520; // aapt resource value: 0x7F020009 public const int ResultStackTrace = 2130837513; // aapt resource value: 0x7F020011 public const int RunEverythingButton = 2130837521; // aapt resource value: 0x7F020012 public const int RunTestsButton = 2130837522; // aapt resource value: 0x7F020013 public const int TestSuiteListView = 2130837523; static Id() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Id() { } } public partial class Layout { // aapt resource value: 0x7F030000 public const int options = 2130903040; // aapt resource value: 0x7F030001 public const int results = 2130903041; // aapt resource value: 0x7F030002 public const int Runner = 2130903042; // aapt resource value: 0x7F030003 public const int test_result = 2130903043; // aapt resource value: 0x7F030004 public const int test_suite = 2130903044; static Layout() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Layout() { } } public partial class Mipmap { // aapt resource value: 0x7F040000 public const int ic_launcher = 2130968576; // aapt resource value: 0x7F040001 public const int ic_launcher_foreground = 2130968577; // aapt resource value: 0x7F040002 public const int ic_launcher_round = 2130968578; static Mipmap() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private Mipmap() { } } public partial class String { // aapt resource value: 0x7F050000 public const int app_name = 2131034112; static String() { global::Android.Runtime.ResourceIdManager.UpdateIdValues(); } private String() { } } } } #pragma warning restore 1591 NunitTest-Android/Resources/mipmap-anydpi-v26/ic_launcher.xml
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@color/ic_launcher_background"/> <foreground android:drawable="@mipmap/ic_launcher_foreground"/> </adaptive-icon> NunitTest-Android/Resources/mipmap-anydpi-v26/ic_launcher_round.xml
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android"> <background android:drawable="@color/ic_launcher_background"/> <foreground android:drawable="@mipmap/ic_launcher_foreground"/> </adaptive-icon> NunitTest-Android/Resources/mipmap-hdpi/ic_launcher.png
NunitTest-Android/Resources/mipmap-hdpi/ic_launcher_foreground.png
NunitTest-Android/Resources/mipmap-hdpi/ic_launcher_round.png
NunitTest-Android/Resources/mipmap-mdpi/ic_launcher.png
NunitTest-Android/Resources/mipmap-mdpi/ic_launcher_foreground.png
NunitTest-Android/Resources/mipmap-mdpi/ic_launcher_round.png
NunitTest-Android/Resources/mipmap-xhdpi/ic_launcher.png
NunitTest-Android/Resources/mipmap-xhdpi/ic_launcher_foreground.png
NunitTest-Android/Resources/mipmap-xhdpi/ic_launcher_round.png
NunitTest-Android/Resources/mipmap-xxhdpi/ic_launcher.png
NunitTest-Android/Resources/mipmap-xxhdpi/ic_launcher_foreground.png
NunitTest-Android/Resources/mipmap-xxhdpi/ic_launcher_round.png
NunitTest-Android/Resources/mipmap-xxxhdpi/ic_launcher.png
NunitTest-Android/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png
NunitTest-Android/Resources/mipmap-xxxhdpi/ic_launcher_round.png
NunitTest-Android/Resources/values/colors.xml
New file @@ -0,0 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="colorPrimary">#2c3e50</color> <color name="colorPrimaryDark">#1B3147</color> <color name="colorAccent">#3498db</color> </resources> NunitTest-Android/Resources/values/ic_launcher_background.xml
New file @@ -0,0 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <resources> <color name="ic_launcher_background">#2C3E50</color> </resources> NunitTest-Android/Resources/values/strings.xml
New file @@ -0,0 +1,4 @@ <resources> <string name="app_name">NunitTest_Android</string> </resources> NunitTest-Android/TestsSample.cs
New file @@ -0,0 +1,44 @@ using System; using NUnit.Framework; namespace NunitTest_Android { [TestFixture] public class TestsSample { [SetUp] public void Setup() { } [TearDown] public void Tear() { } [Test] public void Pass() { Console.WriteLine("test1"); Assert.True(true); } [Test] public void Fail() { Assert.False(true); } [Test] [Ignore("another time")] public void Ignore() { Assert.True(false); } [Test] public void Inconclusive() { Assert.Inconclusive("Inconclusive"); } } } NunitTest-Ios/ApiPostTests.cs
New file @@ -0,0 +1,47 @@ using System; using System.Net; using System.Net.Http; using System.Text; using System.Threading.Tasks; using Newtonsoft.Json; using NUnit.Framework; namespace NunitTestIos { [TestFixture] public class ApiPostTests { private HttpClient client; private const string apiUrl = "https://api.example.com/"; [SetUp] public void Setup() { client = new HttpClient(); client.BaseAddress = new Uri(apiUrl); } [Test] public async Task TestPostRequest() { // 准备 POST 数据 var postData = new { key = "value" }; var json = JsonConvert.SerializeObject(postData); var content = new StringContent(json, Encoding.UTF8, "application/json"); // 发起 POST 请求 HttpResponseMessage response = await client.PostAsync("endpoint", content); // 验证状态码 Assert.AreEqual(HttpStatusCode.Created, response.StatusCode); // 验证返回的数据或响应内容 string responseBody = await response.Content.ReadAsStringAsync(); Assert.IsTrue(!string.IsNullOrEmpty(responseBody)); // 可以进一步验证返回的数据是否符合预期 } } } NunitTest-Ios/Entitlements.plist
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> </dict> </plist> NunitTest-Ios/Info.plist
New file @@ -0,0 +1,36 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"[]> <plist version="1.0"> <dict> <key>CFBundleName</key> <string>NunitTest-Ios</string> <key>CFBundleIdentifier</key> <string>com.hdl.onpronuint.NunitTest-Ios</string> <key>CFBundleShortVersionString</key> <string>1.0</string> <key>CFBundleVersion</key> <string>1.0</string> <key>LSRequiresIPhoneOS</key> <true /> <key>MinimumOSVersion</key> <string>16.4</string> <key>UIDeviceFamily</key> <array> <integer>1</integer> <integer>2</integer> </array> <key>UISupportedInterfaceOrientations</key> <array> <string>UIInterfaceOrientationPortrait</string> <string>UIInterfaceOrientationLandscapeLeft</string> <string>UIInterfaceOrientationLandscapeRight</string> </array> <key>UILaunchStoryboardName</key> <string>LaunchScreen</string> <key>NSAppTransportSecurity</key> <dict> <key>NSAllowsArbitraryLoads</key> <true /> </dict> </dict> </plist> NunitTest-Ios/LaunchScreen.storyboard
New file @@ -0,0 +1,27 @@ <?xml version="1.0" encoding="UTF-8" standalone="no"?> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM"> <dependencies> <deployment identifier="iOS"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/> </dependencies> <scenes> <!--View Controller--> <scene sceneID="EHf-IW-A2E"> <objects> <viewController id="01J-lp-oVM" sceneMemberID="viewController"> <layoutGuides> <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/> <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/> </layoutGuides> <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3"> <rect key="frame" x="0.0" y="0.0" width="600" height="600"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/> </view> </viewController> <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/> </objects> <point key="canvasLocation" x="53" y="375"/> </scene> </scenes> </document> NunitTest-Ios/Main.cs
New file @@ -0,0 +1,20 @@ using System; using System.Linq; using System.Collections.Generic; using Foundation; using UIKit; namespace NunitTestIos { public class Application { // This is the main entry point of the application. static void Main (string[] args) { // if you want to use a different Application Delegate class from "UnitTestAppDelegate" // you can specify it here. UIApplication.Main (args, null, "UnitTestAppDelegate"); } } } NunitTest-Ios/NunitTest-Ios.csproj
New file @@ -0,0 +1,113 @@ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Import Project="..\packages\NUnit.4.0.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.4.0.1\build\NUnit.props')" /> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">iPhoneSimulator</Platform> <ProjectGuid>{C70A6AA7-2FBA-4A37-9132-AD49BD037899}</ProjectGuid> <ProjectTypeGuids>{FEACFBD2-3405-455C-9665-78FE426C6842};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> <OutputType>Exe</OutputType> <RootNamespace>NunitTestIos</RootNamespace> <AssemblyName>NunitTest-Ios</AssemblyName> <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhoneSimulator' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\iPhoneSimulator\Debug</OutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CreatePackage>false</CreatePackage> <CodesignKey>iPhone Developer</CodesignKey> <MtouchDebug>true</MtouchDebug> <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip> <MtouchFastDev>true</MtouchFastDev> <IOSDebuggerPort>46534</IOSDebuggerPort> <MtouchLink>None</MtouchLink> <MtouchArch>x86_64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <DeviceSpecificBuild>false</DeviceSpecificBuild> <_BundlerDebug>false</_BundlerDebug> <MtouchVerbosity></MtouchVerbosity> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\iPhone\Release</OutputPath> <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CreatePackage>false</CreatePackage> <CodesignKey>iPhone Developer</CodesignKey> <MtouchUseLlvm>true</MtouchUseLlvm> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>pdbonly</DebugType> <Optimize>true</Optimize> <OutputPath>bin\iPhoneSimulator\Release</OutputPath> <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CreatePackage>false</CreatePackage> <CodesignKey>iPhone Developer</CodesignKey> <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip> <MtouchLink>None</MtouchLink> <MtouchArch>x86_64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|iPhone' "> <DebugSymbols>true</DebugSymbols> <DebugType>full</DebugType> <Optimize>false</Optimize> <OutputPath>bin\iPhone\Debug</OutputPath> <DefineConstants>DEBUG;</DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CreatePackage>false</CreatePackage> <CodesignKey>iPhone Developer</CodesignKey> <DeviceSpecificBuild>true</DeviceSpecificBuild> <MtouchDebug>true</MtouchDebug> <MtouchNoSymbolStrip>true</MtouchNoSymbolStrip> <MtouchFastDev>true</MtouchFastDev> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> <IOSDebuggerPort>46534</IOSDebuggerPort> <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <_BundlerDebug>false</_BundlerDebug> <MtouchVerbosity></MtouchVerbosity> </PropertyGroup> <ItemGroup> <Reference Include="System" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="Xamarin.iOS" /> <Reference Include="MonoTouch.NUnitLite" /> <Reference Include="System.Net.Http" /> <Reference Include="Newtonsoft.Json"> <HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\netstandard2.0\Newtonsoft.Json.dll</HintPath> </Reference> </ItemGroup> <ItemGroup> <InterfaceDefinition Include="LaunchScreen.storyboard" /> </ItemGroup> <ItemGroup> <None Include="Info.plist" /> <None Include="Entitlements.plist" /> <None Include="packages.config" /> </ItemGroup> <ItemGroup> <Compile Include="Main.cs" /> <Compile Include="UnitTestAppDelegate.cs" /> <Compile Include="ApiPostTests.cs" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" /> </Project> NunitTest-Ios/UnitTestAppDelegate.cs
New file @@ -0,0 +1,46 @@ using System; using System.Linq; using System.Collections.Generic; using Foundation; using UIKit; using MonoTouch.NUnit.UI; namespace NunitTestIos { // The UIApplicationDelegate for the application. This class is responsible for launching the // User Interface of the application, as well as listening (and optionally responding) to // application events from iOS. [Register ("UnitTestAppDelegate")] public partial class UnitTestAppDelegate : UIApplicationDelegate { // class-level declarations UIWindow window; TouchRunner runner; // // This method is invoked when the application has loaded and is ready to run. In this // method you should instantiate the window, load the UI into it and then make the window // visible. // // You have 17 seconds to return from this method, or iOS will terminate your application. // public override bool FinishedLaunching (UIApplication app, NSDictionary options) { // create a new window instance based on the screen size window = new UIWindow (UIScreen.MainScreen.Bounds); runner = new TouchRunner (window); // register every tests included in the main application/assembly runner.Add (System.Reflection.Assembly.GetExecutingAssembly ()); window.RootViewController = new UINavigationController (runner.GetViewController ()); // make the window visible window.MakeKeyAndVisible (); return true; } } } NunitTest-Ios/packages.config
New file @@ -0,0 +1,6 @@ <?xml version="1.0" encoding="utf-8"?> <packages> <package id="Newtonsoft.Json" version="13.0.3" targetFramework="xamarinios10" /> <package id="NUnit" version="4.0.1" targetFramework="xamarinios10" /> <package id="System.Net.Http" version="4.3.4" targetFramework="xamarinios10" /> </packages> SiriIntents/Server/HttpUtil.cs
@@ -17,9 +17,15 @@ /// 公共域名就近解析 /// </summary> public const string GlobalRequestHttpsHost = "https://nearest.hdlcontrol.com"; const string APP_KEY = "HDL-HOME-APP"; const string SECRET_KEY = "CPL345bn28gHnvi9G4tYbq3cTYkiHC"; //public const string GlobalRequestHttpsHost = "https://test-gz.hdlcontrol.com"; const string APP_KEY = "HDL-HOME-APP-TEST"; const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string APP_KEY = "HDL-HOME-APP-TEST"; //public const string SECRET_KEY = "WeJ8TY88vbakCcnvH8G1tDUqzLWY8yss"; //public const string GlobalRequestHttpsHost = "http://59.41.255.150:7777";//mmmm //const string APP_KEY = "CPEVRLRT"; //const string SECRET_KEY = "CPEVRLSJCPEVRLSZ"; SiriIntents/SiriIntents.csproj
@@ -37,7 +37,7 @@ <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> <MtouchUseLlvm>true</MtouchUseLlvm> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> @@ -45,7 +45,7 @@ <MtouchArch>ARM64</MtouchArch> <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <CodesignProvision>OnProSiri230729-1-Dev</CodesignProvision> <CodesignProvision>0002-OnProSiri-240703-1-Hoc</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>pdbonly</DebugType> SiriIntentsUI/SiriIntentsUI.csproj
@@ -38,7 +38,7 @@ <DefineConstants></DefineConstants> <ErrorReport>prompt</ErrorReport> <WarningLevel>4</WarningLevel> <CodesignKey>Apple Development: xuebiao huang (4P32GXQWWK)</CodesignKey> <CodesignKey>Apple Distribution: HDL Automation Co., Ltd (BVTA78PRYA)</CodesignKey> <MtouchUseLlvm>true</MtouchUseLlvm> <MtouchFloat32>true</MtouchFloat32> <CodesignEntitlements>Entitlements.plist</CodesignEntitlements> @@ -47,7 +47,7 @@ <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision> <CodesignProvision>0002-OnProSiriUI-240703-1-Hoc</CodesignProvision> </PropertyGroup> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhoneSimulator' "> <DebugType>pdbonly</DebugType> @@ -85,7 +85,7 @@ <MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler> <MtouchVerbosity></MtouchVerbosity> <AllowUnsafeBlocks>true</AllowUnsafeBlocks> <CodesignProvision>OnProSiriUI230729-1-Dev</CodesignProvision> <CodesignProvision>0002-OnProSiriUI-240704-1-Dev</CodesignProvision> </PropertyGroup> <ItemGroup> <Reference Include="System" />