具體有什麽需求,連接成功了,不需要廣播去獲取了啊?直接從列表啟動使用就行。
《》獲取已配對的藍牙設備(android.bluetooth.BluetoothDevice)
首次連接某藍牙設備需要先配對,壹旦配對成功,該設備的信息會被保存,以後連接時無需再配對,所以已配對的設備不壹定是能連接的。
BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();?Set<BluetoothDevice> devices = adapter.getBondedDevices();?
for(int i=0; i<devices.size(); i++)?
{?
BluetoothDevice device = (BluetoothDevice) devices.iterator().next();?
System.out.println(device.getName());?
}