SimpleUSBConnector
Extension to manage connection to an Esc/Pos thermal printer attached to the device via USB/OTG.
This extension doesn't do the esc/pos commands conversion so this extension is a complement for my extensions:
and i think it can also be used with this one:
This extension manages a permission asked on runtime when a usb printer is attached to the device and shows an alert like this one:
Available blocks
Events:
USBConnectionSucceeded
Event raised when the connection to the printer was successful
USBConnectionFailed
Event raised when the connection to the printer failed
Parameter | Type |
---|---|
errorMessage | text |
PermissionDenied
Event raised when the connection the permission to access the USB was denied by the user
USBDeviceAttached
Event raised when an USB devices is attached to the device
Parameter | Type |
---|---|
deviceName | text |
USBDeviceDetached
Event raised when an USB devices is detached to the device
Parameter | Type |
---|---|
deviceName | text |
Methods:
ConnectUSBPrinter
Connect to the USB printer connected to the device
IsPrinterReady
Validates if is printer is ready to receive printing commands
Return Type: boolean
GetAttachedDevices
Returs a list that contains the usb devices attached to the device
Return Type: list
SendDataToUSBPrinter
Send data to USB printer
Parameter | Type |
---|---|
list | list |
CloseConnection
Closes the connection with the usb device if was previously established
Example blocks
Purchase:
You can buy the extension in the following link for $4 USD