Monitor Printer Status
Understand the differences between these SDKs before migrating to StarXpand SDK.
StarPRNT SDK
Calling connect() in this state causes the corresponding delegate method to be executed when a printer event occurs.
For example, when the printer runs out of paper or its cover is opened, the following appropriate method is executed:
func didPrinterPaperEmpty(_ manager: StarIoExtManager!) {
print("Printer: Paper Empty")
}
func didPrinterCoverOpen(_ manager: StarIoExtManager!) {
print("Printer: Cover Opened")
}
Refer to the Online Manual of the StarIoExtManagerDelegate protocol for a list of retrievable events and delegate methods.
Sample code (GitHub)
StarXpand SDK
Calling open() of the StarPrinter instance in this state causes the corresponding delegate method to be executed when a printer event occurs.
For example, when the printer runs out of paper or its cover is opened, it is notified using the following appropriate method of the PrinterDelegate protocol:
func printerIsPaperEmpty(_ printer: StarPrinter) {
print("Printer: Paper Empty")
}
func printerIsCoverOpen(_ printer: StarPrinter) {
print("Printer: Cover Opened")
}
Refer to the Online Manual of the PrinterDelegate protocol for a list of retrievable events and delegate methods.
Sample code (GitHub)
Refer to Supported API List for information on whether each API is supported in StarPRNT SDK and StarXpand SDK.
Understand the differences between these SDKs before migrating to StarXpand SDK.
StarPRNT SDK
Calling connect() in this state causes the corresponding listener method to be executed when a printer event occurs.
For example, when the printer runs out of paper or its cover is opened, it is notified using the following appropriate method:
override fun onPrinterPaperEmpty() {
Log.d(TAG, "Printer: Paper Empty")
}
override fun onPrinterCoverOpen() {
Log.d(TAG, "Printer: Cover Opened")
}
Refer to the Online Manual of the StarIoExtManagerListener interface for a list of retrievable events and listener methods.
Sample code (GitHub)
StarXpand SDK
Calling openAsync() of the StarPrinter instance in this state causes the corresponding callback method to be executed when a printer event occurs.
For example, when the printer runs out of paper or its cover is opened, it is notified using the following appropriate method of the PrinterDelegate interface:
override fun onPaperEmpty(printer: StarPrinter) {
Log.d(TAG, "Printer: Paper Empty")
}
override fun onCoverOpened(printer: StarPrinter) {
Log.d(TAG, "Printer: Cover Opened")
}
Refer to the Online Manual of the PrinterDelegate interface for a list of retrievable events and callback methods.
Sample code (GitHub)
Refer to Supported API List for information on whether each API is supported in StarPRNT SDK and StarXpand SDK.

