- From: mtom55 via GitHub <sysbot+gh@w3.org>
- Date: Fri, 03 Dec 2021 06:28:33 +0000
- To: public-web-bluetooth-log@w3.org
I'd like to expand on the scenario above, as I think it's a good explanation about scenarios that Web-Bluetooth can't solve which native APIs can. **Scenario** In each shop we have a POS terminal (either an ipad or an Android tablet) with a POS software running as a PWA. There are two (or more) printers: 1. A Label Printer 2. A Thermal Receipt Printer **Association** The ideal situation in the PWA is to setup and associate the PWA with each of the devices ONCE, and then have them continue to work. It becomes less ideal the more times the user has to go through the association process. **Printing** When an order is placed on the system, labels are printed using the label printer so they can be stuck on the box and a receipt is printed on the thermal printer. In this case the PWA is active and can just use web-bluetooth as normal as long as both devices are connected. **Online Order** Online orders are received through the server, while the application is running it's possible to open a web-socket connection to receive the online order and then immediately print both a label and a receipt when one is received. The issue is when the application is not active as the staff often need to switch to other apps. The ideal solution would be to use PUSH API to wake a service worker, which can immediately connect to the bluetooth printers and print. This way if the device is idle or a user is using another application the printing process can continue uninterrupted. Note that this entire process is possible within native apps, but is not possible on web-bluetooth. I realize there are possible privacy/security concerns, but I think a good general stance is if you can do it on native, you should be able to do it on the web. If the privacy/security risks are too big to be mitigated by any process then that functionality should also be removed from native. -- GitHub Notification of comment by mtom55 Please view or discuss this issue at https://github.com/WebBluetoothCG/web-bluetooth/issues/422#issuecomment-985251310 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 3 December 2021 06:28:35 UTC