[PAID] USB Connector for ESC/POS Thermal Printers

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:
image

Available blocks

Events:

USBConnectionSucceeded

USBConnectionSucceededBlock

Event raised when the connection to the printer was successful

USBConnectionFailed

USBConnectionFailedBlock

Event raised when the connection to the printer failed

Parameter Type
errorMessage text

PermissionDenied

PermissionDeniedBlock

Event raised when the connection the permission to access the USB was denied by the user

USBDeviceAttached

USBDeviceAttachedBlock

Event raised when an USB devices is attached to the device

Parameter Type
deviceName text

USBDeviceDetached

USBDeviceDetachedBlock

Event raised when an USB devices is detached to the device

Parameter Type
deviceName text

Methods:

ConnectUSBPrinter

ConnectUSBPrinterBlock

Connect to the USB printer connected to the device

IsPrinterReady

IsPrinterReadyBlock

Validates if is printer is ready to receive printing commands

Return Type: boolean

GetAttachedDevices

GetAttachedDevicesBlock

Returs a list that contains the usb devices attached to the device

Return Type: list

SendDataToUSBPrinter

SendDataToUSBPrinterBlock

Send data to USB printer

Parameter Type
list list

CloseConnection

CloseConnectionBlock

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

1 Like