Added in Version 1.0.0

StarPrinter

The class that controls the printer

Constructor

StarPrinter(connectionSettings: StarConnectionSettings, context: Context)

Initialize object

Property

Default value

Type

information

Printer information

null

StarPrinterInformation?

connectionSettings

Printer connection settings

Value set in constructor

StarConnectionSettings

template

Template

null

String?

errorDetail

Error details

StarIO10ErrorDetail()

StarIO10ErrorDetail

printerDelegate

Status event for the printer

null

PrinterDelegate?

drawerDelegate

Status event for the cash drawer

null

DrawerDelegate?

inputDeviceDelegate

Status event for an input device

null

InputDeviceDelegate?

displayDelegate

Status event for the customer display

null

DisplayDelegate?

openTimeout

Open timeout (msec)

10000

Int

printTimeout

Print timeout (msec)

30000

Int

getStatusTimeout

Get status timeout (msec)

5000

Int

starConfigurationTimeout

Set/Get Star Configuration timeout(msec)

90000

Int

Method

openAsync()

Open the printer

printAsync(command: String)

Print

printAsync(command: String, starSpoolJobSettings: StarSpoolJobSettings)

Print using the printer’s spooler function

printRawDataAsync(data: List<Byte>)

Print binary data

getStatusAsync()

Get the printer status

getSpoolJobStatusAsync(jobId: Int)

Get the print job status of the specified print job ID

getSpoolJobStatusListAsync(size: Int)

Get the print job history (List of print job status) for the specified number of jobs from the most recent.

getStarConfigurationAsync(password: String? = null)

Get the present Star Configuration

getDefaultStarConfigurationAsync()

Get the default Star Configuration

setStarConfigurationAsync(starConfiguration: String)

Set Star Configuration

closeAsync()

Close the printer