有人知道BT_MULTI是否适用于Zebra?我在我的Android应用程序中使用ZebraConnection类并与BT连接:printerAddress作为参数有效但BT_MULTI:printerAddress抛出"无效的连接类型"。
我尝试使用BT_MULTI一次连接多台打印机,但如果您对我如何做到这一点有其他想法,我会很高兴听到它们。
这是抛出异常的代码:
Connection connection;
try {
connection= ConnectionBuilder.build(getConnectionStringForSdk(printerBTAddress));
connection.open();
ZebraPrinter printerdemo = ZebraPrinterFactory.getInstance(connection);
} catch (ConnectionException e) {
System.out.println("Connection could not be opened"+e);
} catch (ZebraPrinterLanguageUnknownException e) {
System.out.println("Unable to create printer"+e);
}
private String getConnectionStringForSdk(String btAddress) {
String selectedPrefix="BT_MULTI:";
final String finalConnectionString = selectedPrefix + btAddress;
return finalConnectionString;
}