Capacitor plugin for Datecs Mobile printers
All SDK API are imported from this https://github.com/giorgiofellipe/cordova-plugin-datecs-printer
Example: https://github.com/megaxayda/test-plugin
npm install datecs-printer-capacitor
npx cap syncgetConnectionStatus()getBluetoothPairedDevices()addListener('bluetoothChange', ...)addListener('bluetoothSearchChange', ...)scanBluetoothDevice()removeAllListeners()connect(...)print(...)- Interfaces
- Type Aliases
getConnectionStatus() => Promise<ConnectionStatus>Returns the bluetooth datecs printer connection status.
Returns: Promise<ConnectionStatus>
getBluetoothPairedDevices() => Promise<any>Returns the bluetooth paired devices.
Returns: Promise<any>
addListener(eventName: 'bluetoothChange', listenerFunc: (res: ConnectionStatus) => void) => Promise<PluginListenerHandle> & PluginListenerHandleListens for bluetooth datecs printer connection status changes.
| Param | Type |
|---|---|
eventName |
'bluetoothChange' |
listenerFunc |
(res: ConnectionStatus) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
addListener(eventName: 'bluetoothSearchChange', listenerFunc: (res: Device) => void) => Promise<PluginListenerHandle> & PluginListenerHandleListens for bluetooth datecs printer connection status changes.
| Param | Type |
|---|---|
eventName |
'bluetoothSearchChange' |
listenerFunc |
(res: Device) => void |
Returns: Promise<PluginListenerHandle> & PluginListenerHandle
scanBluetoothDevice() => Promise<void>Scan bluetooth device, automatically ask for permission.
removeAllListeners() => Promise<void>Removes all listeners
connect(connectParam: ConnectParam) => Promise<void>| Param | Type |
|---|---|
connectParam |
ConnectParam |
print(param: PrintParam) => Promise<void>| Param | Type |
|---|---|
param |
PrintParam |
| Prop | Type |
|---|---|
remove |
() => Promise<void> |
{ status: string; }
{ name: string; address: string; }
{ address: string; }
{ content: string; }