GithubHelp home page GithubHelp logo

Problem with bluetooth printer when printer is off, but paired with device about react-native-thermal-receipt-printer-image-qr HOT 5 OPEN

thiendangit avatar thiendangit commented on April 28, 2024 2
Problem with bluetooth printer when printer is off, but paired with device

from react-native-thermal-receipt-printer-image-qr.

Comments (5)

AbdulBsit avatar AbdulBsit commented on April 28, 2024 2

I have searched everywhere , i found there is no way to find the active status of device, only way is to try connecting the device, if promise failed, we assume device may be off or connected with other device, but here problem is, When you call connect function on off printer, it will hang for few seconds, may be because of the implementation of connect function is not handled correctly for this case, It is consuming JS Thread, which is affecting the rendering of UI, resulting in the unresponsive screen for few seconds

from react-native-thermal-receipt-printer-image-qr.

AbdulBsit avatar AbdulBsit commented on April 28, 2024 1

@codoffer This is happening because , you are not calling init before calling connect

from react-native-thermal-receipt-printer-image-qr.

thiendangit avatar thiendangit commented on April 28, 2024

@AbdulBsit tks your feedback! i'll try it when i have free time or you can create for me a PR

from react-native-thermal-receipt-printer-image-qr.

codoffer avatar codoffer commented on April 28, 2024

@thiendangit @AbdulBsit I am facing the same issue with the paired device. I am saving the selected device to store and reconnect but the application is crashing

Screenshot_20220311-135403
.

from react-native-thermal-receipt-printer-image-qr.

codoffer avatar codoffer commented on April 28, 2024

@AbdulBsit Yes, you may be right. I will call printer init() in print function on other screens.

I am having a single screen for device setup (Device Setting). Using this screen, I have connected and printed the sample perfectly and saved the connected printer to the state (storage) to use the same connected printer on other screens.

It's working fine till the printer is ON. After restarting the printer, It lost connection and gave the above error.

I want to show the alert messages on printers off or paper jam etc.

Thanks for your help

from react-native-thermal-receipt-printer-image-qr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.