giorgiofellipe / cordova-plugin-datecs-printer

Cordova plugin to print on Mobile Bluetooth ESC/POS Printers - Tested on Datecs DPP-250 Printer
MIT License
73 stars 60 forks source link

Cannot access com.giorgiofellipe.datecsprinter.Printer.ConnectionListener #161

Open DesarrolloIT-LM opened 2 years ago

DesarrolloIT-LM commented 2 years ago

Heelo guys:

The problems is when trying to connect the printer.

This is my code section:

window.DatecsPrinter.connect(this.printerAddress, onSuccess => {
  resolve(`connect.onSuccess: ${onSuccess}`);

    window.DatecsPrinter.printText(this.data, 'ISO-8859-1', succe => {
      resolve(`printText.succe: ${succe}`);
    }, err => {
      reject(`Err printText: ${err}`);
    });

}, onError => {
  reject(`Err connect: ${onError}`);
});

The error message is: "Cannot access com.giorgiofellipe.datecsprinter.Printer.ConnectionListener"

The error is on DatecsSDKWrapper, in the line 370:

**mPrinter.setConnectionListener(new Printer.ConnectionListener() {**
          @Override
          public void onDisconnect() {
              sendStatusUpdate(false);
          }
      });

I'm using: Ionic 6.17.1 with capacitor The plugin is "cordova-plugin-datecs-printer": "^0.10.0", Android Studio 2020.3.1 Patch 3 Gradle: 7.0.3 Android SDK (API Level): 30,29,28, 19

NOTE: the printer is a Bixolon SPP-R210

Any idea or suggestion to follow ??

ZarooDotnet commented 2 years ago

Hi Are u solve it