访问Android Chrome浏览器中的Web串行API
在Windows,Mac OS和Linux Chrome浏览器中使用Web Serial API,我可以接收并发送数据。但是在Android Chrome浏览器中,我无法从串行设备发送或接收数据。
因此,哪个API用于在Android Chrome浏览器中读取和写入数据。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在Chromium中构建Web串行API实现的团队还编写了一个Polyfill库,该库使用WebUSB支持不提供内置串行驱动程序的平台: https://github.com/google/web-serial-polyfill
看起来您已经在尝试使用此库。您可以在图书馆的GitHub项目上提交问题,以便团队可以查看您看到的错误吗?
请注意,似乎有些具有USB串行驱动程序的Android设备最终会阻止Webusb声称接口,即使该平台不允许应用程序实际使用它们。 https://crbug.com/1099521 正在跟踪解决方法。
The 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.com/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.com/1099521 is tracking a workaround for that.