I working in V7 POS Terminal(Printing Module) android Machine(V5.1.1). I Have configured the SDK (Jar file) in My application. Server Application is Installed the POS Machine. The Problem occurred during the print. Here I have included my steps. I am stuck in the Problem more than a Day. Help me fix it.
Service Started.
public void startService(){
Intent intent = new Intent();
intent.setAction("com.justtide.service.dev.AIDL_SERVICE");
intent.setPackage("com.justtide.service.dev");
bindService(intent, mConnection, Service.BIND_AUTO_CREATE);
}
Device Provider
private ServiceConnection mConnection = new ServiceConnection() {
@Override
public void onServiceDisconnected(ComponentName name) {
}
@Override
public synchronized void onServiceConnected(ComponentName name, IBinder service) {
// TODO Auto-generated method stub
mDeviceProvider = DeviceProvider.Stub.asInterface(service);
}
};
Printer Provider
printerProvider =mDeviceProvider.getPrinterProvider();
printerProvider.fillStringFormat("TEST",PRINTER_FONT_SIZE_SMALL,PRINTER_FONT_TYPE_BOLD,PRINTER_ALIGNMENT_CENTER);
printerProvider.fillString("001420183990573");
int ret=-1;
try{
ret = printerProvider.print(); // The Problem is occurred here.
} catch (RemoteException e) {
e.printStackTrace();
}
Here I have included my Error Logs in POS Machine.
Error Selected Application
com.example.justtidev7_demo I/Timeline: Timeline: Activity_idle id: android.os.BinderProxy@3e9ea6fc time:3027349
com.example.justtidev7_demo W/System.err: android.os.DeadObjectException
com.example.justtidev7_demo W/System.err: at android.os.BinderProxy.transactNative(Native Method)
com.example.justtidev7_demo W/System.err: at android.os.BinderProxy.transact(Binder.java:496)
com.example.justtidev7_demo W/System.err: at com.justtide.service.dev.aidl.printer.PrinterProvider$Stub$Proxy.print(PrinterProvider.java:274)
com.example.justtidev7_demo W/System.err: at
com.justtide.dao.Printer.print(Printer.java:34)
com.example.justtidev7_demo W/System.err: at
com.justtide.activity.PrintActivity$3.run(PrintActivity.java:111)
com.example.justtidev7_demo W/System.err: at java.lang.Thread.run(Thread.java:818)
Error No Filter
JustD: jdc_connect ...
02-08 15:36:51.577 15261-15276/? E/JavaBinder: *** Uncaught remote
exception! (Exceptions are not yet supported across processes.)
java.lang.NoSuchMethodError: No virtual method printerOpen()I in class
Lcom/just/api/PosDevice; or its super classes (declaration of
'com.just.api.PosDevice' appears in
/system/framework/framework.jar:classes2.dex) at
com.justtide.justtide.aq.d(Unknown Source) at justtide.PrintPicture.startPrint(Unknown Source) at com.justtide.service.dev.i.print(Unknown Source) at com.justtide.service.dev.aidl.printer.PrinterProvider$Stub.onTransact(Unknown Source) at android.os.Binder.execTransact(Binder.java:446)
02-08 15:36:51.577 15261-15276/? E/AndroidRuntime: FATAL EXCEPTION: Binder_1
Process: com.justtide.service.dev, PID: 15261
java.lang.NoSuchMethodError: No virtual method printerOpen()I in class Lcom/just/api/PosDevice; or its super classes (declaration of 'com.just.api.PosDevice' appears in /system/framework/framework.jar:classes2.dex)
at com.justtide.justtide.aq.d(Unknown Source)
at justtide.PrintPicture.startPrint(Unknown Source)
at com.justtide.service.dev.i.print(Unknown Source)
at com.justtide.service.dev.aidl.printer.PrinterProvider$Stub.onTransact(Unknown Source)
at android.os.Binder.execTransact(Binder.java:446)