简体   繁体   中英

chrome app chrome.hid.getUserSelectedDevices is not a function

I am currently developping a chrome app to interact with a USB HID device. My device is currently not found using chrome.hid.getDevices, but it is found using chrome.usb.getDevices. Both permissions are in the manifest, and in the device manager my device is found under the HID sub-menu.

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. 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

Is there something that needs to be installed or done so that chrome.hid works properly? I'm currently in Windows 7 and on Chrome version 48.0.2564.82 m

Thank you

At the time of this answer, chrome.hid.getUserSelectedDevices is only in the Dev channel. You can download the Dev channel build of Chrome here: 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"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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