My understanding from the Java project,
first, the demo entry point is
\PrinterDemo\app\src\main\java\com\newpos\printDemo\
MainActivity.java
which utilize the class from a subdirectory \PrinterDemo\app\src\main\java\com\newpos\printDemo
\printer
The printer directory contains the following classes:
RecipetPrinter.java
TransLog.java
thus, the code in MainActivity contains the following line:
import com.newpos.printDemo.printer.RecipetPrinter;
import com.newpos.printDemo.printer.TransLog;
import com.newpos.printlib.ui.IPrinterUI;
In order for the demo to work, you also need to "wrap" or convert the functions inside them using JavaObject in B4X. Unless you compile them as jars and import using #AdditionalJars.
Then the demo project also required the code from
com.newpos.printlib.* class.
The source code is inside
\PrinterDemo\printLib\src\main\java\com\newpos\
printlib
Inside the printlib directory, there are the following:
print
ui
StringTools.java
Inside \PrinterDemo\printLib\src\main\java\com\newpos\printlib\print, there are the following classes:
DevicePrinter.java
FontSize.java
PrinterTextView.java
PrintManager.java
TicketFontSize.java
If we want to tackle the DevicePrinter.java, we can see the source is depends on the following classes:
import com.newpos.printlib.ui.IPrinterUI;
import com.pos.device.printer.PrintCanvas;
import com.pos.device.printer.PrintTask;
import com.pos.device.printer.Printer;
And the line 2 to 4 are depending on the sdk.jar
So my suggestion is you need to convert all the Java classes to B4X first or compile them as jars then only you can make the demo works.
The classes are depending on another classes that they can't work alone.