안녕하세요 초보 개발자입니다.
BluetoothAdapter mBtAdapter = null;
mBtAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> pairedDevices = mBtAdapter.getBondedDevices();
if (pairedDevices.size() > 0) {
for (BluetoothDevice device : pairedDevices) {
Log.d("Bluetooth", device.getName());
}
위의 코드를 사용해서 device.getName() 을 찍어보면
휴대폰에 페어링 된적이 있어 프로파일이 등록돼있는 모든 블루투스 장비들이 찍힙니다.
헌데 저는 등록된 프로파일들을 검사하면서 현재 연결이 돼있는 블루투스를 찾고 싶은데요
device.getBondState 를 써서 연결유무를 알 수 있나 햇는데
이역시 페어링 된적이 있는지만 반환해서 모두 같은 값이 나오더라구요..
고수님들 현재 연결된 블루투수만 가져오는 방법이 있나요..?