我正在开发钛合金项目。 我需要使用Beacon模块使用BLE扫描信标。 我的问题是,我无法让模块工作。在钛合金中使用模块
我使用了安装移动模块安装模块,我启用它在tiapp.xml文件。
这是代码,我目前的样子:
var Beacons = require('com.logicallabs.beacons');
function doClick(beacon) {
if(Beacons.BeaconsModule.isEnabled()){
alert('succes');
}else{
alert("suces");
}
}
$.index.open();
当你点击一个标签的功能被启动。该模块包含3个类。你必须指定你必须使用哪一类的极大方法?
而且当我开始这个节目,我得到错误说Could not find class 'android.bluetooth.BluetoothManager
和Could not find class 'com.logicallabs.beacons.ScanService$2
我仍然得到错误找不到类“android.bluetooth.BluetoothManager和找不到类” com.logicallabs。 beacons.ScanService港币$ 16。我在Android设备上进行调试,因为我无法使仿真器正常工作。它可能是我的android的问题? – Ken