admin管理员组文章数量:1389772
using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.
so which API is used to read and write data to serial devices in the android chrome browser.
also, there is a polyfill serial API for android chrome but is showing an error shown in the image.
using web serial API in windows, mac os, and Linux chrome browser I can receive and send data. but in the android chrome browser, I am not able to send or receive data from a serial device.
so which API is used to read and write data to serial devices in the android chrome browser.
also, there is a polyfill serial API for android chrome but is showing an error shown in the image.
Share Improve this question asked May 12, 2022 at 5:36 Tejas ChauhanTejas Chauhan 1091 gold badge3 silver badges13 bronze badges 5- 1 Are you aware of: caniuse./?search=serial – Morrison Chang Commented May 12, 2022 at 5:50
- yes. I have read, that web serial API is not supported in android chrome. but is there another way to municate with a serial(USB-based) device from android chrome? because my PWA project requires access on both desktop and mobile. – Tejas Chauhan Commented May 12, 2022 at 6:18
- Given that Android apps written in Java/Kotlin need/use a third-party library to support USB Serial: github./mik3y/usb-serial-for-android it is unlikely unless the browser has similar code. – Morrison Chang Commented May 12, 2022 at 6:34
- okay!! thanks for answering! using this I have to build. APK file. using this I can municate to the serial device. – Tejas Chauhan Commented May 12, 2022 at 6:58
- @TejasChauhan hi! I am reaching you just to know more on it, my project requirement make a web application for lungs function test machine which creates the live data for 4 secs as patients breathes using desktop application. By using this web serial API is it possible to capture uping live data on web client(browser) . Currently I ma in the POC phase would be great if you can answer it. – Shobhit Solanki Commented Jan 22, 2024 at 6:43
1 Answer
Reset to default 4The team that built the implementation of the Web Serial API in Chromium also wrote a polyfill library which uses WebUSB to support platforms which don't provide built-in serial drivers: https://github./google/web-serial-polyfill
It looks like you are already trying to use this library. Can you file an issue on the library's GitHub project so the team can look at the error you're seeing?
Note, it seems like there are some Android devices which have USB serial drivers that end up blocking WebUSB from claiming interfaces even though the platform doesn't let apps actually use them. https://crbug./1099521 is tracking a workaround for that.
本文标签: javascriptaccess web serial api in android chrome browserStack Overflow
版权声明:本文标题:javascript - access web serial api in android chrome browser - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744647536a2617489.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论