程序只执行到connect()就没下文了,远程设备上也显示已连接上,但程序就这样卡着,我该怎么接收设备传来的数据呢??
var bluetoothSocket = device.createInsecureRfcommSocketToServiceRecord(uuid);
plus.android.importClass(bluetoothSocket);
if (!bluetoothSocket.isConnected()) {
console.log('first');
bluetoothSocket.connect();
console.log('then???');
}
1 个回复
扎拉司徒 (作者)
到connect()处就一直阻塞了,有什么办法吗?