-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The connectPrinter
method of BLEPrinter
does not throw any error when it fails to connect to the printer
#130
Comments
connectPrinter
method in BLEPrinter
is not throw any error when it fails to connect to the printerconnectPrinter
method of BLEPrinter
does not throw any error when it fails to connect to the printer
connectPrinter
method of BLEPrinter
does not throw any error when it fails to connect to the printerconnectPrinter
method of BLEPrinter
does not throw any error when it fails to connect to the printer
Did anyone find a workaround for this? I even did, using some then/catch, but it just stopped working when updated to android SDK to 34. Basically printer works fine, but then app crashes if printer is turned off. With no way to catch error nor displaying unreachable BLE printer message to user whatsoever. any help would be appreciated! |
Can you show the code you are using to print? |
Sure:
This code prints ok, but wont fall to the catch exception (or any other) if printer is off. Tried some variations of this, with no success. Thanks in advance for the help @francesco-clementi-92 |
To work around you can use a timeout to check you connect, if more than 3s (or any seconds) then return "disconnect" @francesco-clementi-92 @felixoakz |
Hi, I have a problem with the
connectPrinter
method inBLEPrinter
. When it fails to connect to the printer, it does not throw any error, so the application crashes while printing the receipt. I think this problem is quite crucial in the receipt printing process. Is there any alternative way to solve this problem?The text was updated successfully, but these errors were encountered: