0
科爾多瓦 - 插件 - 鉻 - 應用程序 - 藍牙我有插件科爾多瓦 - 插件 - 鉻 - 應用藍牙和科爾多瓦 - 插件 - 鉻 - 應用程序 - 共同如何運行科爾多瓦
一個科爾多瓦應用cordova plugin add cordova-plugin-chrome-apps-bluetooth
cordova plugin add cordova-plugin-chrome-apps-common
我想讀chrome.bluetooth.getAdapterState()
app.scan = function() {
console.log("app.scan()");
var res = chrome.bluetooth.getAdapterState(function( adapterInfo) {
console.log("callback");
console.log("adapterInfo");
}
);
};
index.html中
結果:
<button on-click="app.scan()" >scan</button>
在鉻JS控制檯,我可以看到app.scan(),但回調一直沒有出現。
是這個插件應該在科爾多瓦真的有用嗎?或者可能是我錯過了什麼?
由於內容安全政策的Chrome應用程序,內聯JS腳本不允許在這裏:https://developer.chrome.com/apps/contentSecurityPolicy – gui47