diff --git a/AndroidPDACommand.csproj b/AndroidPDACommand.csproj index bf8628c1599e6325fbbe0e3cddd293044fdd2b46..9d634e0b7a162561b05fff49cf80c450bef5c0ec 100644 --- a/AndroidPDACommand.csproj +++ b/AndroidPDACommand.csproj @@ -75,6 +75,7 @@ + @@ -82,6 +83,7 @@ + @@ -205,6 +207,9 @@ + + + "D:\ForguncyCode\puglin\PluginTools\PluginPackageTool\bin\Release\PluginPackageTool.exe" "$(ProjectDir)\" "$(ConfigurationName)" diff --git a/Biometric_Auth_Async.cs b/Biometric_Auth_Async.cs new file mode 100644 index 0000000000000000000000000000000000000000..8395db63bcfa51ee474d1509bf4800f6d676ab73 --- /dev/null +++ b/Biometric_Auth_Async.cs @@ -0,0 +1,25 @@ +using System.ComponentModel; +using GrapeCity.Forguncy.Commands; +using GrapeCity.Forguncy.Plugin; + +namespace AndroidPDACommand +{ + [Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_Biometric.png")] + [Category("活字格安卓容器(HAC)")] + [OrderWeight(81)] + public class Biometric_Auth_Async : BaseAsyncCommand + { + public override string ToString() + { + return "生物认证识别"; + } + + [DisplayName("认证模式")] + [ComboProperty(ValueList = "BIOMETRIC_STRONG|BIOMETRIC_WEAK|DEVICE_CREDENTIAL", DisplayList = "强生物识别|弱生物识别|设备密码识别")] + public string AuthType { get; set; } = "BIOMETRIC_STRONG"; + + [Browsable(false)] + [ResultToProperty] + public string AuthResultMessage { get; set; } = "AuthResultMessage"; + } +} \ No newline at end of file diff --git a/Biometric_Available_Async.cs b/Biometric_Available_Async.cs new file mode 100644 index 0000000000000000000000000000000000000000..6894abce01790369de4a3fcbc75bf0525007200f --- /dev/null +++ b/Biometric_Available_Async.cs @@ -0,0 +1,29 @@ +using System.ComponentModel; +using GrapeCity.Forguncy.Commands; +using GrapeCity.Forguncy.Plugin; + +namespace AndroidPDACommand +{ + [Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_Biometric.png")] + [Category("活字格安卓容器(HAC)")] + [OrderWeight(80)] + public class Biometric_Available_Async : BaseAsyncCommand + { + public override string ToString() + { + return "生物认证检测"; + } + + [DisplayName("认证模式")] + [ComboProperty(ValueList = "BIOMETRIC_STRONG|BIOMETRIC_WEAK|DEVICE_CREDENTIAL", DisplayList = "强生物识别|弱生物识别|设备密码识别")] + public string AuthType { get; set; } = "BIOMETRIC_STRONG"; + + [Browsable(false)] + [ResultToProperty] + public string IsAvailable { get; set; } = "IsAvailable"; + + [Browsable(false)] + [ResultToProperty] + public string VerifyMessage { get; set; } = "VerifyMessage"; + } +} \ No newline at end of file diff --git a/Broadcast_Mode_ContinuousScanStart_Async.cs b/Broadcast_Mode_ContinuousScanStart_Async.cs index 3994b07d032e75285ef170a29ac3ee8cc8745fb7..2c0301bb00c4e301eea274e91333d89c209b0f31 100644 --- a/Broadcast_Mode_ContinuousScanStart_Async.cs +++ b/Broadcast_Mode_ContinuousScanStart_Async.cs @@ -24,6 +24,10 @@ namespace AndroidPDACommand [Browsable(false)] [ResultToProperty] public string SubCommandParam1 { get; set; } = "Totally_Received"; + + [Browsable(false)] + [ResultToProperty] + public string SubCommandParam2 { get; set; } = "Current_Received"; } } diff --git a/PluginConfig.json b/PluginConfig.json index fa405e804064fc5c85e494c85077ce941148d8dd..df57b62c3dfab828bc263c68db06d2c89de59e9c 100644 --- a/PluginConfig.json +++ b/PluginConfig.json @@ -12,7 +12,7 @@ "name": "PDA(Android)交互命令", "pluginType": "command", "guid": "{16B8DF69-1379-41C1-9194-BE89BAF8BB32}", - "version": "1.20.2.0", + "version": "1.21.0.0", "dependenceVersion": "8.0.0.0", "bundleJavaScript": true, "bundleCSS": true diff --git a/Resources/AndroidPDACommand.js b/Resources/AndroidPDACommand.js index c45d8057d755a6e4f525696a8089965840ab9263..dafc0e1f72b985330c379b7f58b7daca460cb38e 100644 --- a/Resources/AndroidPDACommand.js +++ b/Resources/AndroidPDACommand.js @@ -131,7 +131,7 @@ var Broadcast_Mode_Scan_Async_Command = (function (_super) { if (window.pda && window.pda.modal_scanAsync) { if (!isModal || isModal === 0) { - window.pda.modal_scanAsync(ticket, 1); + window.pda.continuous_scanAsync(ticket, 1); } else { window.pda.modal_scanAsync(ticket); } @@ -261,6 +261,7 @@ var Broadcast_Mode_ContinuousScanStart_Async_Command = (function (_super) { commandID: new Date().valueOf().toString(), initParams: { "Totally_Received": payload, + "Current_Received": payload2, "IsSuccess": true, "Error": "" }, @@ -2481,4 +2482,83 @@ var OnKeyDown_Listen_Stop_All_Command = (function (_super) { return OnKeyDown_Listen_Stop_All_Command; }(Forguncy.CommandBase)); -Forguncy.CommandFactory.registerCommand("AndroidPDACommand.OnKeyDown_Listen_Stop_All, AndroidPDACommand", OnKeyDown_Listen_Stop_All_Command); \ No newline at end of file +Forguncy.CommandFactory.registerCommand("AndroidPDACommand.OnKeyDown_Listen_Stop_All, AndroidPDACommand", OnKeyDown_Listen_Stop_All_Command); + +var Biometric_Auth_Async_Command = (function (_super) { + __extends(Biometric_Auth_Async_Command, _super); + function Biometric_Auth_Async_Command() { + return _super !== null && _super.apply(this, arguments) || this; + } + + Biometric_Auth_Async_Command.prototype.execute = function () { + + var me = this; + var params = this.CommandParam; + var authType = this.evaluateFormula(params.AuthType); + + var ticket = HAC_GenerateCallbackTicket(me, function (payload, payload2) { + me.CommandExecutor.excuteCommand(me.CommandParam.CommandList, { + runTimePageName: me.CommandExecutingInfo.runTimePageName, + commandID: new Date().valueOf().toString(), + initParams: { + "AuthResultMessage": payload, + "IsSuccess": true, + "Error": "" + }, + locationString: "执行window.biometric.biometricAuthAsync" + }); + }); + + if (window.biometric && window.biometric.biometricAuthAsync) { + window.biometric.biometricAuthAsync(authType, ticket); + } else { + HAC_CallFunctionOutOfHAC(); + } + + }; + + + return Biometric_Auth_Async_Command; +}(Forguncy.CommandBase)); + +Forguncy.CommandFactory.registerCommand("AndroidPDACommand.Biometric_Auth_Async, AndroidPDACommand", Biometric_Auth_Async_Command); + +var Biometric_Available_Async_Command = (function (_super) { + __extends(Biometric_Available_Async_Command, _super); + function Biometric_Available_Async_Command() { + return _super !== null && _super.apply(this, arguments) || this; + } + + Biometric_Available_Async_Command.prototype.execute = function () { + + var me = this; + var params = this.CommandParam; + var authType = this.evaluateFormula(params.AuthType); + + var ticket = HAC_GenerateCallbackTicket(me, function (payload, payload2) { + me.CommandExecutor.excuteCommand(me.CommandParam.CommandList, { + runTimePageName: me.CommandExecutingInfo.runTimePageName, + commandID: new Date().valueOf().toString(), + initParams: { + "IsAvailable": payload, + "VerifyMessage": payload2, + "IsSuccess": true, + "Error": "" + }, + locationString: "执行window.biometric.isAvailableAuth" + }); + }); + + if (window.biometric && window.biometric.isAvailableAuth) { + window.biometric.isAvailableAuth(authType, ticket); + } else { + HAC_CallFunctionOutOfHAC(); + } + + }; + + + return Biometric_Available_Async_Command; +}(Forguncy.CommandBase)); + +Forguncy.CommandFactory.registerCommand("AndroidPDACommand.Biometric_Available_Async, AndroidPDACommand", Biometric_Available_Async_Command); \ No newline at end of file diff --git a/Resources/Icon_Biometric.png b/Resources/Icon_Biometric.png new file mode 100644 index 0000000000000000000000000000000000000000..778042072e5d375e61b88827cd35521db50ba172 Binary files /dev/null and b/Resources/Icon_Biometric.png differ