Я пытаюсь получить свои связанные устройства bluetooth, но я могу получить его как длинную строку вместо списка.
Это мой код:
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
ArrayList<String> listview =
new ArrayList<String>(Arrays.asList(pairedDevices.toString()));
setListAdapter(new ArrayAdapter<String>(this, R.layout.list, listview));
Я получаю что-то вроде этого: [00:23:7F:1c, f0:09:f1:b4:b0]
. И все это в одной строке.
Как я могу изменить его в списке и не все в одной строке?
Также, как я могу получить дружественные имена устройств, а не эти цифры?
Спасибо!!!