I have Pax A920 which runs with android . So how to using printing service in java?
I suggest you to use the Neptune api. you can google pax 920 neptune api demo and the fist link that shows up (https://docs.hips.com/docs/pax-a920) contains a demo that shows all the basic functions (including the printer) and you can run it on your device:
In the Application you first need a function to retrieve the IDAL:
public static IDAL getDal() {
if(dal == null){ //dal is a private static IDAL variable of the application
try {
dal = NeptuneLiteUser.getInstance().getDal(context);
} catch (Exception e) {}
}
return dal;
}
then in your activity you can just do the following:
try {
IPrinter printer= MyApp.getDal().getPrinter();
printer.init();
printer.printStr("Your text",null);
printer.start();
} catch (PrinterDevException e) {
e.printStackTrace();
}