简体   繁体   中英

Using Bluetooth with a Google Chrome extension

I've seen the experimental API for using Bluetooth has been recently released and I wanted to perform a few tests. I've looked at the official documentation at http://code.google.com/chrome/extensions/trunk/experimental.bluetooth.html but even the most simple example won't work. Of course, I previously set the permissions correctly in order to use the experimental APIs.

My background.js looks like this:

function booleanCallback(result) {
    alert(result.toString());
}

chrome.experimental.bluetooth.isPowered(booleanCallback);

No matter what, result is always undefined . Any thoughts on this?

Cheers.

The Bluetooth API is currently only implemented on Chrome OS. There are open issues for the implementation on Windows , Mac and Linux . You may want to star one or more of those to be updated when the API is available on more platforms.

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