@captureid/capacitor-cidplugin
Capacitor Plugin for CaptureID Library Family
Install
npm install @captureid/capacitor-cidplugin
npx cap sync
API
initCaptureIDLib()
initCaptureIDLib() => void
showDeviceControlBar(...)
showDeviceControlBar(options: { show: boolean; }) => void
| Param | Type | 
|---|
| options | { show: boolean; } | 
activateLicense(...)
activateLicense(options: { productKey: string; customer: string; }) => void
| Param | Type | 
|---|
| options | { productKey: string; customer: string; } | 
setConfiguration(...)
setConfiguration(options: { config: CIDControlBarConfig; }) => void
| Param | Type | 
|---|
| options | { config: CIDControlBarConfig; } | 
enableRFIDSupport(...)
enableRFIDSupport(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
enableCameraScanSupport(...)
enableCameraScanSupport(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
enableScanSupport(...)
enableScanSupport(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
enablePrintSupport(...)
enablePrintSupport(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
enableBTScanSupport(...)
enableBTScanSupport(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
startScanner()
startScanner() => Promise<void>
connectRFIDReader()
connectRFIDReader() => Promise<void>
connectBTScanner()
connectBTScanner() => Promise<void>
selectBTScanner()
selectBTScanner() => Promise<void>
selectRFIDReader()
selectRFIDReader() => Promise<void>
selectPrinter()
selectPrinter() => Promise<void>
getPluginVersions()
getPluginVersions() => Promise<LibraryVersionList>
Returns: Promise<LibraryVersionList>
enableCIDControlBar(...)
enableCIDControlBar(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
enableScanCommandButton(...)
enableScanCommandButton(options: { enable: boolean; }) => void
| Param | Type | 
|---|
| options | { enable: boolean; } | 
addListener(string, ...)
addListener(eventName: string, listenerFunc: (data: any) => void) => PluginListenerHandle
| Param | Type | 
|---|
| eventName | string | 
| listenerFunc | (data: any) => void | 
Returns: PluginListenerHandle
removeAllListeners()
removeAllListeners() => void
Interfaces
CIDControlBarConfig
| Prop | Type | 
|---|
| fixed | boolean | 
| enabled | boolean | 
| visible | boolean | 
| orientation | CIDOrienatation | 
| command | CommandBarConfig | 
| control | ControlBarConfig | 
CommandBarConfig
| Prop | Type | 
|---|
| backgroundColor | string | 
| buttons | CommandButton[] | 
CommandButton
| Prop | Type | 
|---|
| type | string | 
| iconSource | string | 
| iconText | string | 
| iconColor | ButtonColors | 
| visible | boolean | 
| state | CIDButtonState | 
ButtonColors
| Prop | Type | 
|---|
| enabled | ButtonStateColors | 
| disabled | ButtonStateColors | 
| selected | ButtonStateColors | 
ButtonStateColors
| Prop | Type | 
|---|
| background | string | 
| icon | string | 
ControlBarConfig
| Prop | Type | 
|---|
| backgroundColor | string | 
| buttonwidth | number | 
| buttons | CommandButton[] | 
LibraryVersionList
| Prop | Type | 
|---|
| libraries | LibraryVersion[] | 
LibraryVersion
| Prop | Type | 
|---|
| name | string | 
| version | string | 
PluginListenerHandle
| Prop | Type | 
|---|
| remove | () => Promise<void> | 
Enums
CIDOrienatation
| Members | Value | 
|---|
| LEFT | 1 | 
| TOP | 2 | 
| RIGHT | 3 | 
| BOTTOM | 4 | 
CIDButtonState
| Members | Value | 
|---|
| ENABLED | 0 | 
| DISABLED | 1 | 
| ACTIVE | 2 |