简体   繁体   English

chrome应用程序chrome.hid.getUserSelectedDevices不是函数

[英]chrome app chrome.hid.getUserSelectedDevices is not a function

I am currently developping a chrome app to interact with a USB HID device. 我目前正在开发与USB HID设备交互的Chrome应用。 My device is currently not found using chrome.hid.getDevices, but it is found using chrome.usb.getDevices. 目前无法使用chrome.hid.getDevices找到我的设备,但是使用chrome.usb.getDevices找到了我的设备。 Both permissions are in the manifest, and in the device manager my device is found under the HID sub-menu. 这两个权限都在清单中,并且在设备管理器中,我的设备位于HID子菜单下。

I tried checking if I could manually add it using chrome.hid.getUserSelectedDevices and see if it was getting picked up, but I get the "chrome.hid.getUserSelectedDevices is not a function" error. 我尝试检查是否可以使用chrome.hid.getUserSelectedDevices手动添加它,并查看是否被拾取,但是出现“ chrome.hid.getUserSelectedDevices不是函数”错误。 I get the same error when I try running the HID sample app found here without modifying anything : https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hid 当我尝试运行此处找到的HID示例应用程序而未进行任何修改时,出现相同的错误: https : //github.com/GoogleChrome/chrome-app-samples/tree/master/samples/hid

Is there something that needs to be installed or done so that chrome.hid works properly? 是否需要安装或完成某些操作才能使chrome.hid正常工作? I'm currently in Windows 7 and on Chrome version 48.0.2564.82 m 我目前在Windows 7和Chrome版本48.0.2564.82 m中

Thank you 谢谢

At the time of this answer, chrome.hid.getUserSelectedDevices is only in the Dev channel. 在回答此问题时, chrome.hid.getUserSelectedDevices仅在Dev通道中。 You can download the Dev channel build of Chrome here: https://www.chromium.org/getting-involved/dev-channel 您可以在此处下载Chrome的Dev通道版本: https : //www.chromium.org/getting-involved/dev-channel

To see if that call is in the Stable release, go to the documentation and see if it no longer says "Dev channel only" 要查看该调用是否在Stable版本中, 请转到文档 ,看看它是否不再显示“仅Dev频道”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM