Google Chrome Web Serial API: Will it work after the computer go to sleep/idle?

80 views Asked by At

I'm implementing a QR Code reader (via a Honeywell 7580g reader) for check-ins. This uses the reader as a serial connection, not as a keyboard input.

Users will show their QR Code to the reader, and then through the web serial connection, the app will get the code and check in (call an API).

I have a PoC in place that's working. But I would like to confirm if this solution is feasible beyond the scope of a PoC or if I need to fallback to a desktop app instead.

  1. This only works if I keep the Chrome tab open. Is there a way to keep it working in the background even if the Chrome tab isn't opened? Keeping the tab open can cause issues. Someone will eventually restart the host computer and forget that they need to open the browser and a specific page or mistakenly close the tab while navigating using the browser. Any ideas here?
  2. I noticed that it stopped working after the computer went to sleep. Can it continue to work even if the computer goes to sleep?

My use case is to keep reading from the serial port as in the background as possible. It won't be just when users are doing something with the app.

0

There are 0 answers