package biz.logismic;
import com.brother.ptouch.sdk.*;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.*;
@Version(3.0f)
@ShortName("BrotherPrintSDK")
@DependsOn(values={"BrotherPrintLibrary"})
public class BrotherPrintSDK {
public String print(String filePath,String printerIP){
Printer myPrinter = new Printer();
PrinterInfo myPrinterInfo = new PrinterInfo();
PrinterStatus printResult = new PrinterStatus();
LabelInfo mLabelInfo=new LabelInfo();
myPrinterInfo = myPrinter.getPrinterInfo();
myPrinterInfo.printerModel=PrinterInfo.Model.QL_720NW;
myPrinterInfo.printMode=PrinterInfo.PrintMode.FIT_TO_PAGE;
myPrinterInfo.port=PrinterInfo.Port.NET;
myPrinterInfo.paperSize = PrinterInfo.PaperSize.CUSTOM;
myPrinterInfo.orientation = PrinterInf

rientation.PORTRAIT;
myPrinterInfo.numberOfCopies = 1;
myPrinterInfo.ipAddress=printerIP;
mLabelInfo.labelNameIndex=LabelInfo.QL700.valueOf("W29H90").ordinal();
mLabelInfo.isAutoCut = true;
mLabelInfo.isEndCut =true;
myPrinter.setPrinterInfo(myPrinterInfo);
myPrinter.setLabelInfo(mLabelInfo);
printResult=myPrinter.printFile(filePath);
return printResult.errorCode.toString();
}}
the error : ERROR_COMMUNICATION_ERROR