Getting paired device info

Y Yanis Dalabiras 3 years 6 months ago
3 2 0

Hi developers,
I am asking this for one my customer who is planning to use with TC70 devices.
It's based on the sample at the link http://techdocs.zebra.com/enterprise-browser/1-6/guide/samples/ . First search and pair, then connect and run printData steps were being processed.

Question is.... would it be possible to get paired device ID before connect process and connect&print directly without user interaction to select printer?
They need to add paired device directly the field below finalPrinterarray[selectedPrinterIndex]

finalPrinterarray[selectedPrinterIndex].connect(myconnectcallback);
printData();

Thanks in advance

Please Register or Login to post a reply

2 Replies

Y Yanis Dalabiras

Thanks Brian

B Brian Moore

Cengiz,

This is possible, you can refer to the EB printer documentation here: Printer - Zebra Technologies TechDocs

When the method EB.Printer.searchPrinters() calls the callback, you get the status and printerId of each found printer. Instead of adding the printer id to an array to display, you can call the method EB.PrinterZebra.getPrinterByID() to get that printer object. Once you have the printer object, you can call the .connect() method.

Another possibility is to use the default printer. Instead of searching for printers and then connecting to a found printer you can connect to the default printer using the method: EB.Printer.connect().

Thanks,
Brian Moore
Software Engineer Kutir Mobility
Posted on behalf of Zebra Technologies

CONTACT
Can’t find what you’re looking for?