The Status Channel on iOS

Hi,

my application is running on Android/iOS devices and printing on link-OS printer

on Android i check the printer status via the status channel, before sending a job, like that:

Connection btStatusConnection = new BluetoothStatusConnection(theBtMacAddress);

ZebraPrinter printer = ZebraPrinterFactory.getLinkOsPrinter(connection, PrinterLanguage.ZPL);

if (null == printer) {

     printer = ZebraPrinterFactory.getInstance(PrinterLanguage.ZPL, connection);

}

PrinterStatus printerStatus = printer.getCurrentStatus();

 

How can i achieve the same practice on iOS

 

thanks

Samantha Corn
Hi Adel,There is a

Hi Adel,

There is a PrinterStatus class in the Link-OS SDK for iOS as well. Full documentation on this class can be found here. There is also the same getCurrentStatus function in the Zebra Printer class, documentation is here.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adel Sari
Thanks for the response,The

Thanks for the response,

The StatusConnection is not implemented on link-os iOS version (hopefully it will be done next version !)

from link-os doc

"The A status connection to a Link-OS printer. This connection will not block the printing channel, nor can it print."

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Samantha Corn
Hi Adel,I don't think

Hi Adel,

I don't think StatusConnection is necessary for iOS implementation. The getCurrentStatus function has the same functionality as its Android equivalent. To use it in Objective-C would look something like this:

TcpPrinterConnection *zebraPrinterConnection = [[TcpPrinterConnection alloc] initWithAddress:@"192.168.1.100" andWithPort:6101];

BOOL success = [zebraPrinterConnection open];

NSError *error = nil;

id<ZebraPrinter,NSObject> printer = [ZebraPrinterFactory getInstance:zebraPrinterConnection error:&error];

PrinterStatus printerstatus = [printer getCurrentStatus];

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Adel Sari
Hi Samantha,if you can have a

Hi Samantha,

if you can have a look at this post, see Robin West response

you will know, why the i am using the Status Connection to get the printer status before sending a job,

and here

you can see the response from Steven Si

thanks

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments