因此,我增加了对空洞档案的许可,并粉碎了我的装置,但我在这里正在遇撞: Set pairedDevices = btAdapter.getBondedDevices();
我试图通过点击连接:
private OnClickListener myListener = new OnClickListener() {
public void onClick(View v) {
switch (v.getId()) {
case R.id.main_btnYes:
connectToNXT(); // connect to NXT
myIntent = new Intent(v.getContext(), SelectSession.class);
startActivityForResult(myIntent, 0);
break;
case R.id.main_btnNo:
myIntent = new Intent(v.getContext(), ExitScreen.class);
startActivityForResult(myIntent, 0);
break;
}
}
};
Here is the connectToNXT() method: The crash occurs here: Set bondedDevices = btAdapter.getBondedDevices(); private void connectToNXT() {
BluetoothAdapter btAdapter = BluetoothAdapter.getDefaultAdapter();
**Set<BluetoothDevice> bondedDevices = btAdapter.getBondedDevices();**
BluetoothDevice nxtDevice = null;
}
任何人都知道为什么会造成坠毁?
而且,由于Im在甲状腺和蓝to(2天:D)上很新,有人可能很喜欢,让我知道对甲状蓝to有好的辅导?
感谢
里。