Hey
I made a library from sdk file from brother site
with SimpleLibraryCompiler and this java code
every time i try to print i get ERROR_CONNECT_SOCKET_FAILED
but if i print with brother sdk demo app with the same settings , I can print
what can be the problem ?
tanks
package michael.vegs;
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;
//myPrinter.skipStatusCheck=true;
mLabelInfo.labelNameIndex=LabelInfo.QL700.valueOf("W29H90").ordinal();
//mLabelInfo.labelNameIndex=5;
mLabelInfo.isAutoCut = true;
mLabelInfo.isEndCut =true;
myPrinter.setPrinterInfo(myPrinterInfo);
myPrinter.setLabelInfo(mLabelInfo);
printResult=myPrinter.printFile(filePath);
return printResult.errorCode.toString();
}}