@kduma-autoid/capacitor-sunmi-scanhead v3.1.2
@kduma-autoid/capacitor-sunmi-scanhead
Sunmi Scan Head bindings for Capacitor
Install
npm install @kduma-autoid/capacitor-sunmi-scanhead
npx cap sync
Configuration
You can disable auto binding of the service by setting bindOnLoad
to false
in the plugin configuration in capacitor.config.ts
.
/// <reference types="@kduma-autoid/capacitor-sunmi-scanhead" />
import { CapacitorConfig } from '@capacitor/cli';
const config: CapacitorConfig = {
appId: "com.company.app",
...
plugins: {
SunmiScanHead: {
bindOnLoad: true
}
}
}
export default config;
API
bindService()
unBindService()
scan()
stop()
getScannerModel()
clearConfig()
setTrigger(...)
beep()
vibrate()
createWriteContext(...)
commitWriteContext()
discardWriteContext()
getOutputType()
setOutputType(...)
getTriggerMethod()
setTriggerMethod(...)
getScanResultCodeID()
setScanResultCodeID(...)
isAdvancedFormatEnabled()
setAdvancedFormatEnabled(...)
getAdvancedFormats()
setAdvancedFormats(...)
clearAdvancedFormats()
addAdvancedFormat(...)
updateAdvancedFormat(...)
removeAdvancedFormat(...)
isBeep()
setBeep(...)
isVibrate()
setVibrate(...)
isOutputBroadcastEnabled()
setOutputBroadcastEnabled(...)
getBroadcastConfiguration()
setBroadcastConfiguration(...)
getOutputEncodingCode()
setOutputEncodingCode(...)
isVirtualFloatingScanButton()
setVirtualFloatingScanButton(...)
getCenterFlagScan()
setCenterFlagScan(...)
isFlash()
setFlash(...)
getScene()
setScene(...)
isRemoveGroupSeparator()
setRemoveGroupSeparator(...)
getPrefix()
setPrefix(...)
getPrefixCharactersRemoved()
setPrefixCharactersRemoved(...)
getSuffix()
setSuffix(...)
getSuffixCharactersRemoved()
setSuffixCharactersRemoved(...)
getBarcodesList()
getBarcode(...)
setBarcode(...)
getBarcodeConfig(...)
getCheckCharMode(...)
setCheckCharMode(...)
getCheckCharType(...)
setCheckCharType(...)
getDoubleCode(...)
setDoubleCode(...)
getFormatCode(...)
setFormatCode(...)
getInverseCode(...)
setInverseCode(...)
isExtendCode1(...)
setExtendCode1(...)
isExtendCode2(...)
setExtendCode2(...)
isExtendToCode(...)
setExtendToCode(...)
isMicroCode(...)
setMicroCode(...)
isStartEndType(...)
setStartEndType(...)
isSystemCharZero(...)
setSystemCharZero(...)
getMaxLen(...)
setMaxLen(...)
getMinLen(...)
setMinLen(...)
getStartEndFormat(...)
setStartEndFormat(...)
addListener('onScanResult', ...)
addListener('onScanStart', ...)
addListener('onScanStop', ...)
removeAllListeners()
- Interfaces
- Type Aliases
- Enums
bindService()
bindService() => Promise<void>
bind scan service
unBindService()
unBindService() => Promise<void>
unbind scan service
scan()
scan() => Promise<void>
Start scanner
stop()
stop() => Promise<void>
Stop scanner
getScannerModel()
getScannerModel() => Promise<GetScannerModelResponse>
Get scanner model
Returns: Promise<GetScannerModelResponse>
clearConfig()
clearConfig() => Promise<ClearConfigResponse>
Clear scanner configuration (reset to default)
Returns: Promise<ClearConfigResponse>
setTrigger(...)
setTrigger(options?: SetTriggerOptions | undefined) => Promise<void>
Enable or disable trigger button
Param | Type |
---|---|
options | SetTriggerOptions |
beep()
beep() => Promise<void>
Play a beep sound
vibrate()
vibrate() => Promise<void>
Vibrate
createWriteContext(...)
createWriteContext(options?: CreateWriteContextOptions | undefined) => Promise<void>
Prepares transaction for writing settings to scanner
Param | Type |
---|---|
options | CreateWriteContextOptions |
commitWriteContext()
commitWriteContext() => Promise<void>
Write settings to scanner
discardWriteContext()
discardWriteContext() => Promise<void>
Discard transaction for writing settings to scanner
getOutputType()
getOutputType() => Promise<GetOutputTypeResponse>
Gets current output mode
Returns: Promise<GetOutputTypeResponse>
setOutputType(...)
setOutputType(options: SetOutputTypeOptions) => Promise<void>
Set output mode
Param | Type |
---|---|
options | SetOutputTypeOptions |
getTriggerMethod()
getTriggerMethod() => Promise<GetTriggerMethodResponse>
Gets current scan mode
Returns: Promise<GetTriggerMethodResponse>
setTriggerMethod(...)
setTriggerMethod(options: SetTriggerMethodOptions) => Promise<void>
Set scan mode
Param | Type |
---|---|
options | SetTriggerMethodOptions |
getScanResultCodeID()
getScanResultCodeID() => Promise<GetScanResultCodeIDResponse>
Gets current variant of code type returned with scan result
Returns: Promise<GetScanResultCodeIDResponse>
setScanResultCodeID(...)
setScanResultCodeID(options?: SetScanResultCodeIDOptions | undefined) => Promise<void>
Selects variant of code type returned with scan result
Param | Type |
---|---|
options | SetScanResultCodeIDOptions |
isAdvancedFormatEnabled()
isAdvancedFormatEnabled() => Promise<IsAdvancedFormatEnabledResponse>
Checks if advanced formatting options provided in configuration are enabled
Returns: Promise<IsAdvancedFormatEnabledResponse>
setAdvancedFormatEnabled(...)
setAdvancedFormatEnabled(options?: SetAdvancedFormatEnabledOptions | undefined) => Promise<void>
Enable or disable advanced formatting options provided in configuration
Param | Type |
---|---|
options | SetAdvancedFormatEnabledOptions |
getAdvancedFormats()
getAdvancedFormats() => Promise<GetAdvancedFormatEnabledResponse>
Gets advanced formatting options (character replacement arrays) provided in configuration
Returns: Promise<GetAdvancedFormatEnabledResponse>
setAdvancedFormats(...)
setAdvancedFormats(options: SetAdvancedFormatOptions) => Promise<void>
Sets advanced formatting options (character replacement arrays) provided in configuration
Param | Type |
---|---|
options | SetAdvancedFormatOptions |
clearAdvancedFormats()
clearAdvancedFormats() => Promise<void>
Clears all advanced formatting options
addAdvancedFormat(...)
addAdvancedFormat(options: AddAdvancedFormatOptions) => Promise<void>
Adds new advanced formatting option
Param | Type |
---|---|
options | AddAdvancedFormatOptions |
updateAdvancedFormat(...)
updateAdvancedFormat(options: UpdateAdvancedFormatOptions) => Promise<void>
Updates advanced formatting option
Param | Type |
---|---|
options | UpdateAdvancedFormatOptions |
removeAdvancedFormat(...)
removeAdvancedFormat(options: RemoveAdvancedFormatOptions) => Promise<void>
Removes advanced formatting option
Param | Type |
---|---|
options | RemoveAdvancedFormatOptions |
isBeep()
isBeep() => Promise<IsBeepResponse>
Checks if sound prompts on scan are enabled
Returns: Promise<IsBeepResponse>
setBeep(...)
setBeep(options?: SetBeepOptions | undefined) => Promise<void>
Enable or disable sound prompts on scan
Param | Type |
---|---|
options | SetBeepOptions |
isVibrate()
isVibrate() => Promise<IsVibrateResponse>
Checks if vibration prompts on scan are enabled
Returns: Promise<IsVibrateResponse>
setVibrate(...)
setVibrate(options?: SetVibrateOptions | undefined) => Promise<void>
Enable or disable vibration prompts on scan
Param | Type |
---|---|
options | SetVibrateOptions |
isOutputBroadcastEnabled()
isOutputBroadcastEnabled() => Promise<IsOutputBroadcastEnableResponse>
Checks if scan result broadcast is enabled
Returns: Promise<IsOutputBroadcastEnableResponse>
setOutputBroadcastEnabled(...)
setOutputBroadcastEnabled(options?: SetOutputBroadcastEnabledOutput | undefined) => Promise<void>
Enable or disable scan result broadcast
Param | Type |
---|---|
options | SetOutputBroadcastEnabledOutput |
getBroadcastConfiguration()
getBroadcastConfiguration() => Promise<GetBroadcastConfigurationResponse>
Get broadcast configuration
Warning: This method only reads what you have wrote to write context, as there is no way to read those settings from system at this moment (If you know how, please make a PR)
Returns: Promise<GetBroadcastConfigurationResponse>
setBroadcastConfiguration(...)
setBroadcastConfiguration(options?: SetBroadcastConfigurationOptions | undefined) => Promise<void>
Set broadcast configuration
Param | Type |
---|---|
options | SetBroadcastConfigurationOptions |
getOutputEncodingCode()
getOutputEncodingCode() => Promise<GetOutputEncodingCodeResponse>
Get current output encoding/character set setting
Returns: Promise<GetOutputEncodingCodeResponse>
setOutputEncodingCode(...)
setOutputEncodingCode(options?: SetOutputEncodingCodeOptions | undefined) => Promise<void>
Set output encoding/character set setting
Param | Type |
---|---|
options | SetOutputEncodingCodeOptions |
isVirtualFloatingScanButton()
isVirtualFloatingScanButton() => Promise<IsVirtualFloatingScanButtonResponse>
Checks if virtual floating scan button is enabled
Returns: Promise<IsVirtualFloatingScanButtonResponse>
setVirtualFloatingScanButton(...)
setVirtualFloatingScanButton(options?: SetVirtualFloatingScanButtonOptions | undefined) => Promise<void>
Enable or disable the virtual floating scan button
Param | Type |
---|---|
options | SetVirtualFloatingScanButtonOptions |
getCenterFlagScan()
getCenterFlagScan() => Promise<GetCenterFlagScanResponse>
Gets current center point decoding mode
Returns: Promise<GetCenterFlagScanResponse>
setCenterFlagScan(...)
setCenterFlagScan(options?: SetCenterFlagScanOptions | undefined) => Promise<void>
Sets center point decoding mode
Param | Type |
---|---|
options | SetCenterFlagScanOptions |
isFlash()
isFlash() => Promise<IsFlashResponse>
Checks if scanner illumination is enabled
Returns: Promise<IsFlashResponse>
setFlash(...)
setFlash(options?: SetFlashOptions | undefined) => Promise<void>
Controls scanner illumination
Hardware support limited
Param | Type |
---|---|
options | SetFlashOptions |
getScene()
getScene() => Promise<GetSceneResponse>
Gets current scanning scene preset
Returns: Promise<GetSceneResponse>
setScene(...)
setScene(options?: SetSceneOptions | undefined) => Promise<void>
Sets scanning scene preset
Hardware support limited
Param | Type |
---|---|
options | SetSceneOptions |
isRemoveGroupSeparator()
isRemoveGroupSeparator() => Promise<IsRemoveGroupSeparatorResponse>
Checks if the removal of group separator characters is enabled
Returns: Promise<IsRemoveGroupSeparatorResponse>
setRemoveGroupSeparator(...)
setRemoveGroupSeparator(options?: SetRemoveGroupSeparatorOptions | undefined) => Promise<void>
Enables or disables the removal of group separator characters
Hardware support limited
Param | Type |
---|---|
options | SetRemoveGroupSeparatorOptions |
getPrefix()
getPrefix() => Promise<GetPrefixResponse>
Gets the prefix which is prepended to the barcode data
Returns: Promise<GetPrefixResponse>
setPrefix(...)
setPrefix(options?: SetPrefixOptions | undefined) => Promise<void>
Sets the prefix to be prepended to the barcode data
Param | Type |
---|---|
options | SetPrefixOptions |
getPrefixCharactersRemoved()
getPrefixCharactersRemoved() => Promise<GetPrefixCharactersRemovedResponse>
Gets the number of characters which are removed from the beginning of the barcode data
Returns: Promise<GetPrefixCharactersRemovedResponse>
setPrefixCharactersRemoved(...)
setPrefixCharactersRemoved(options?: SetPrefixCharactersRemovedOptions | undefined) => Promise<void>
Sets the prefix characters to be removed from the barcode data
Hardware support limited
Param | Type |
---|---|
options | SetPrefixCharactersRemovedOptions |
getSuffix()
getSuffix() => Promise<GetSuffixResponse>
Gets the suffix which is appended to the barcode data
Returns: Promise<GetSuffixResponse>
setSuffix(...)
setSuffix(options?: SetSuffixOptions | undefined) => Promise<void>
Sets the suffix to be appended to the barcode data
Param | Type |
---|---|
options | SetSuffixOptions |
getSuffixCharactersRemoved()
getSuffixCharactersRemoved() => Promise<GetSuffixCharactersRemovedResponse>
Gets the number of characters which are removed from the end of the barcode data
Returns: Promise<GetSuffixCharactersRemovedResponse>
setSuffixCharactersRemoved(...)
setSuffixCharactersRemoved(options?: SetSuffixCharactersRemovedOptions | undefined) => Promise<void>
Sets the suffix characters to be removed from the barcode data
Hardware support limited
Param | Type |
---|---|
options | SetSuffixCharactersRemovedOptions |
getBarcodesList()
getBarcodesList() => Promise<GetBarcodesListResponse>
Gets the list of barcodes, and its statuses.
Returns: Promise<GetBarcodesListResponse>
getBarcode(...)
getBarcode(options: GetBarcodeOptions) => Promise<GetBarcodeResponse>
Gets the status of a barcode
Param | Type |
---|---|
options | GetBarcodeOptions |
Returns: Promise<GetBarcodeResponse>
setBarcode(...)
setBarcode(options: SetBarcodeOptions) => Promise<void>
Sets the status of a barcode
Param | Type |
---|---|
options | SetBarcodeOptions |
getBarcodeConfig(...)
getBarcodeConfig(options: GetBarcodeConfigOptions) => Promise<GetBarcodeConfigResponse>
Gets the configuration of a barcode symbology
Param | Type |
---|---|
options | GetBarcodeConfigOptions |
Returns: Promise<GetBarcodeConfigResponse>
getCheckCharMode(...)
getCheckCharMode(options: GetCheckCharModeOptions) => Promise<GetCheckCharModeResponse>
Param | Type |
---|---|
options | GetCheckCharModeOptions |
Returns: Promise<GetCheckCharModeResponse>
setCheckCharMode(...)
setCheckCharMode(options: SetCheckCharModeOptions) => Promise<void>
Param | Type |
---|---|
options | SetCheckCharModeOptions |
getCheckCharType(...)
getCheckCharType(options: GetCheckCharTypeOptions) => Promise<GetCheckCharTypeResponse>
Param | Type |
---|---|
options | GetCheckCharTypeOptions |
Returns: Promise<GetCheckCharTypeResponse>
setCheckCharType(...)
setCheckCharType(options: SetCheckCharTypeOptions) => Promise<void>
Param | Type |
---|---|
options | SetCheckCharTypeOptions |
getDoubleCode(...)
getDoubleCode(options: GetDoubleCodeOptions) => Promise<GetDoubleCodeResponse>
Param | Type |
---|---|
options | GetDoubleCodeOptions |
Returns: Promise<GetDoubleCodeResponse>
setDoubleCode(...)
setDoubleCode(options: SetDoubleCodeOptions) => Promise<void>
Param | Type |
---|---|
options | SetDoubleCodeOptions |
getFormatCode(...)
getFormatCode(options: GetFormatCodeOptions) => Promise<GetFormatCodeResponse>
Param | Type |
---|---|
options | GetFormatCodeOptions |
Returns: Promise<GetFormatCodeResponse>
setFormatCode(...)
setFormatCode(options: SetFormatCodeOptions) => Promise<void>
Param | Type |
---|---|
options | SetFormatCodeOptions |
getInverseCode(...)
getInverseCode(options: GetInverseCodeOptions) => Promise<GetInverseCodeResponse>
Param | Type |
---|---|
options | GetInverseCodeOptions |
Returns: Promise<GetInverseCodeResponse>
setInverseCode(...)
setInverseCode(options: SetInverseCodeOptions) => Promise<void>
Param | Type |
---|---|
options | SetInverseCodeOptions |
isExtendCode1(...)
isExtendCode1(options: IsExtendCode1Options) => Promise<IsExtendCode1Response>
Param | Type |
---|---|
options | IsExtendCode1Options |
Returns: Promise<IsExtendCode1Response>
setExtendCode1(...)
setExtendCode1(options: SetExtendCode1Options) => Promise<void>
Param | Type |
---|---|
options | SetExtendCode1Options |
isExtendCode2(...)
isExtendCode2(options: IsExtendCode2Options) => Promise<IsExtendCode2Response>
Param | Type |
---|---|
options | IsExtendCode2Options |
Returns: Promise<IsExtendCode2Response>
setExtendCode2(...)
setExtendCode2(options: SetExtendCode2Options) => Promise<void>
Param | Type |
---|---|
options | SetExtendCode2Options |
isExtendToCode(...)
isExtendToCode(options: IsExtendToCodeOptions) => Promise<IsExtendToCodeResponse>
Param | Type |
---|---|
options | IsExtendToCodeOptions |
Returns: Promise<IsExtendToCodeResponse>
setExtendToCode(...)
setExtendToCode(options: SetExtendToCodeOptions) => Promise<void>
Param | Type |
---|---|
options | SetExtendToCodeOptions |
isMicroCode(...)
isMicroCode(options: IsMicroCodeOptions) => Promise<IsMicroCodeResponse>
Param | Type |
---|---|
options | IsMicroCodeOptions |
Returns: Promise<IsMicroCodeResponse>
setMicroCode(...)
setMicroCode(options: SetMicroCodeOptions) => Promise<void>
Param | Type |
---|---|
options | SetMicroCodeOptions |
isStartEndType(...)
isStartEndType(options: IsStartEndTypeOptions) => Promise<IsStartEndTypeResponse>
Param | Type |
---|---|
options | IsStartEndTypeOptions |
Returns: Promise<IsStartEndTypeResponse>
setStartEndType(...)
setStartEndType(options: SetStartEndTypeOptions) => Promise<void>
Param | Type |
---|---|
options | SetStartEndTypeOptions |
isSystemCharZero(...)
isSystemCharZero(options: IsSystemCharZeroOptions) => Promise<IsSystemCharZeroResponse>
Param | Type |
---|---|
options | IsSystemCharZeroOptions |
Returns: Promise<IsSystemCharZeroResponse>
setSystemCharZero(...)
setSystemCharZero(options: SetSystemCharZeroOptions) => Promise<void>
Param | Type |
---|---|
options | SetSystemCharZeroOptions |
getMaxLen(...)
getMaxLen(options: GetMaxLenOptions) => Promise<GetMaxLenResponse>
Param | Type |
---|---|
options | GetMaxLenOptions |
Returns: Promise<GetMaxLenResponse>
setMaxLen(...)
setMaxLen(options: SetMaxLenOptions) => Promise<void>
Param | Type |
---|---|
options | SetMaxLenOptions |
getMinLen(...)
getMinLen(options: GetMinLenOptions) => Promise<GetMinLenResponse>
Param | Type |
---|---|
options | GetMinLenOptions |
Returns: Promise<GetMinLenResponse>
setMinLen(...)
setMinLen(options: SetMinLenOptions) => Promise<void>
Param | Type |
---|---|
options | SetMinLenOptions |
getStartEndFormat(...)
getStartEndFormat(options: GetStartEndFormatOptions) => Promise<GetStartEndFormatResponse>
Param | Type |
---|---|
options | GetStartEndFormatOptions |
Returns: Promise<GetStartEndFormatResponse>
setStartEndFormat(...)
setStartEndFormat(options: SetStartEndFormatOptions) => Promise<void>
Param | Type |
---|---|
options | SetStartEndFormatOptions |
addListener('onScanResult', ...)
addListener(eventName: 'onScanResult', listenerFunc: OnScanResultListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listens for barcode scanner result events.
Param | Type |
---|---|
eventName | 'onScanResult' |
listenerFunc | OnScanResultListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onScanStart', ...)
addListener(eventName: 'onScanStart', listenerFunc: OnScanStartListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listens for barcode scanner start events.
Param | Type |
---|---|
eventName | 'onScanStart' |
listenerFunc | OnScanStartListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener('onScanStop', ...)
addListener(eventName: 'onScanStop', listenerFunc: OnScanStopListener) => Promise<PluginListenerHandle> & PluginListenerHandle
Listens for barcode scanner stop events.
Param | Type |
---|---|
eventName | 'onScanStop' |
listenerFunc | OnScanStopListener |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
removeAllListeners()
removeAllListeners() => Promise<void>
Removes all listeners
Interfaces
GetScannerModelResponse
Prop | Type | Description |
---|---|---|
id | number | Numeric identifier of the scanner model |
name | ScannerModelName | String identifier of the scanner model |
ClearConfigResponse
Prop | Type | Description |
---|---|---|
cleared | boolean | Status of the operation |
SetTriggerOptions
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable trigger button | true |
CreateWriteContextOptions
Prop | Type | Description | Default |
---|---|---|---|
type | WriteContextType | WriteContextType[] | Selects write context type you want to create | WriteContextType.Service, WriteContextType.Decoders |
GetOutputTypeDisabledResponse
Prop | Type | Description |
---|---|---|
mode | OutputMode.Disabled | No direct output |
GetOutputTypeKeystrokeResponse
Prop | Type | Description |
---|---|---|
mode | OutputMode.Keystroke | Virtual Keyboard output |
interval | number | Time to sleep between keystrokes |
tab | boolean | Send a tab keystroke after the barcode |
enter | boolean | Send an enter keystroke after the barcode |
space | boolean | Send a space keystroke after the barcode Hardware support limited |
GetOutputTypeDirectFillResponse
Prop | Type | Description |
---|---|---|
mode | OutputMode.DirectFill | OutputMode.DirectFillWithReplace | Fill in EditText directly |
tab | boolean | Send a tab keystroke after the barcode |
enter | boolean | Send an enter keystroke after the barcode |
space | boolean | Send a space keystroke after the barcode Hardware support limited |
asEvent | boolean | Convert characters into keys |
SetOutputTypeDisabledOptions
Prop | Type | Description |
---|---|---|
mode | OutputMode.Disabled | No direct output |
SetOutputTypeKeystrokeOptions
Prop | Type | Description | Default |
---|---|---|---|
mode | OutputMode.Keystroke | Virtual Keyboard output | |
interval | number | Time to sleep between keystrokes | 0 |
tab | boolean | Send a tab keystroke after the barcode | false |
enter | boolean | Send an enter keystroke after the barcode | true |
space | boolean | Send a space keystroke after the barcode Hardware support limited | false |
SetOutputTypeDirectFillOptions
Prop | Type | Description | Default |
---|---|---|---|
mode | OutputMode.DirectFill | OutputMode.DirectFillWithReplace | Fill in EditText directly | |
tab | boolean | Send a tab keystroke after the barcode | false |
enter | boolean | Send an enter keystroke after the barcode | true |
space | boolean | Send a space keystroke after the barcode Hardware support limited | false |
asEvent | boolean | Convert characters into keys | false |
GetTriggerMethodTriggerPulseResponse
Prop | Type | Description |
---|---|---|
mode | ScanMode.Trigger | ScanMode.Pulse | |
timeout | number | Timeout after which the scanner will stop scanning if no barcode is detected |
GetTriggerMethodContinuousLongPressResponse
Prop | Type | Description |
---|---|---|
mode | ScanMode.Continuous | ScanMode.LongPress | |
timeout | number | Timeout after which the scanner will stop scanning if no barcode is detected |
sleep | number | Time to sleep between scans |
SetTriggerMethodTriggerPulseOptions
Prop | Type | Description | Default |
---|---|---|---|
mode | ScanMode.Trigger | ScanMode.Pulse | ||
timeout | number | Timeout after which the scanner will stop scanning if no barcode is detected | 5000 |
SetTriggerMethodContinuousLongPressOptions
Prop | Type | Description | Default |
---|---|---|---|
mode | ScanMode.Continuous | ScanMode.LongPress | ||
timeout | number | Timeout after which the scanner will stop scanning if no barcode is detected | 5000 |
sleep | number | Time to sleep between scans | 500 |
GetScanResultCodeIDResponse
Prop | Type | Description |
---|---|---|
type | ScanResultCodeIDEnum | Selects variant of code type returned with scan result |
SetScanResultCodeIDOptions
Prop | Type | Description | Default |
---|---|---|---|
type | ScanResultCodeIDEnum | Selects variant of code type returned with scan result | ScanResultCodeIDEnum.None |
IsAdvancedFormatEnabledResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable advanced formatting options provided in configuration |
SetAdvancedFormatEnabledOptions
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable advanced formatting options provided in configuration | true |
GetAdvancedFormatEnabledResponse
Prop | Type | Description |
---|---|---|
formats | Map<string, string> | List of advanced formatting options - characters replacement |
Map
Prop | Type |
---|---|
size | number |
Method | Signature |
---|---|
clear | () => void |
delete | (key: K) => boolean |
forEach | (callbackfn: (value: V, key: K, map: Map<K, V>) => void, thisArg?: any) => void |
get | (key: K) => V | undefined |
has | (key: K) => boolean |
set | (key: K, value: V) => this |
SetAdvancedFormatOptions
Prop | Type | Description | Default |
---|---|---|---|
formats | Map<string, string> | List of advanced formatting options - characters replacement | [] |
AddAdvancedFormatOptions
Prop | Type | Description |
---|---|---|
search | string | Value to search for |
replacement | string | Value to replace with |
UpdateAdvancedFormatOptions
Prop | Type | Description |
---|---|---|
old_search | string | Previous search value |
search | string | New search value |
replacement | string | Value to replace with |
RemoveAdvancedFormatOptions
Prop | Type | Description |
---|---|---|
search | string | Value to search for |
IsBeepResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable sound prompts on scan |
SetBeepOptions
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable sound prompts on scan | true |
IsVibrateResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable vibration prompts on scan |
SetVibrateOptions
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable vibration prompts on scan | true |
IsOutputBroadcastEnableResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable scan result broadcast |
SetOutputBroadcastEnabledOutput
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable scan result broadcast | true |
GetBroadcastConfigurationResponse
Prop | Type | Description |
---|---|---|
scanned_intent | string | Intent name broadcasted when a barcode is scanned |
start_intent | string | false | Intent name broadcasted when scanner starts scanning Set to false to disable |
end_intent | string | false | Intent name broadcasted when scanner stops scanning Set to false to disable |
intent_data_key | string | Intent extra key for barcode plain text data in scan result intent (scanned_intent ) |
intent_byte_key | string | Intent extra key for barcode base64 encoded data in scan result intent (scanned_intent ) |
SetBroadcastConfigurationOptions
Prop | Type | Description | Default |
---|---|---|---|
scanned_intent | string | Intent name broadcasted when a barcode is scanned | com.sunmi.scanner.ACTION_DATA_CODE_RECEIVED |
start_intent | string | false | Intent name broadcasted when scanner starts scanning Set to false to disable | com.sunmi.scanner.ACTION_SCAN_START |
end_intent | string | false | Intent name broadcasted when scanner stops scanning Set to false to disable | com.sunmi.scanner.ACTION_SCAN_END |
intent_data_key | string | Intent extra key for barcode plain text data in scan result intent (scanned_intent ) | data |
intent_byte_key | string | Intent extra key for barcode base64 encoded data in scan result intent (scanned_intent ) | source_byte |
GetOutputEncodingCodeResponse
Prop | Type | Description |
---|---|---|
encoding | OutputEncodingCodeEnum | Set output encoding/character set setting |
SetOutputEncodingCodeOptions
Prop | Type | Description | Default |
---|---|---|---|
encoding | OutputEncodingCodeEnum | Set output encoding/character set setting | OutputEncodingCodeEnum.UTF8 |
IsVirtualFloatingScanButtonResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable virtual floating scan button |
SetVirtualFloatingScanButtonOptions
Prop | Type | Description | Default |
---|---|---|---|
enabled | boolean | Enable or disable virtual floating scan button | true |
GetCenterFlagScanResponse
Prop | Type | Description |
---|---|---|
mode | CenterDecodingSettingEnum | Selects center point decoding mode |
SetCenterFlagScanOptions
Prop | Type | Description | Default |
---|---|---|---|
mode | CenterDecodingSettingEnum | Selects center point decoding mode | CenterDecodingSettingEnum.Disabled |
IsFlashResponse
Prop | Type | Description |
---|---|---|
enabled | boolean | Enable or disable scanner illumina |