Hi...
I had just try this package. My printer used USB to connect. When connected, the printer device can be detected. But when I click the device in list, It just restarted.
I had just edited the _connect function.
_connect(int vendorId, int productId) async { bool? returned = false; try { returned = await flutterUsbPrinter.connect(vendorId, productId); debugPrint(devices.toList().toString()); } on PlatformException { //response = 'Failed to get platform version.'; debugPrint("Failed to get platform version"); } if (returned!) { setState(() { connected = true; }); } }
When I click the list of device, it reproduce error like this :
E/MethodChannel#flutter_usb_printer(32636): at android.hardware.usb.IUsbManager$Stub.onTransact(IUsbManager.java:619) E/MethodChannel#flutter_usb_printer(32636): at android.os.Binder.execTransactInternal(Binder.java:1281) E/MethodChannel#flutter_usb_printer(32636): at android.os.Binder.execTransact(Binder.java:1244) E/MethodChannel#flutter_usb_printer(32636): I/flutter (32636): Failed to get platform version
Hi... I had just try this package. My printer used USB to connect. When connected, the printer device can be detected. But when I click the device in list, It just restarted.
I had just edited the _connect function.
_connect(int vendorId, int productId) async { bool? returned = false; try { returned = await flutterUsbPrinter.connect(vendorId, productId); debugPrint(devices.toList().toString()); } on PlatformException { //response = 'Failed to get platform version.'; debugPrint("Failed to get platform version"); } if (returned!) { setState(() { connected = true; }); } }
When I click the list of device, it reproduce error like this :
E/MethodChannel#flutter_usb_printer(32636): at android.hardware.usb.IUsbManager$Stub.onTransact(IUsbManager.java:619) E/MethodChannel#flutter_usb_printer(32636): at android.os.Binder.execTransactInternal(Binder.java:1281) E/MethodChannel#flutter_usb_printer(32636): at android.os.Binder.execTransact(Binder.java:1244) E/MethodChannel#flutter_usb_printer(32636): I/flutter (32636): Failed to get platform version
am I did something wrong?