Tryam Tryam - 1 year ago 72
Android Question

Choose first device from paired devices

How to choose first device in

list without using

Do they number from 0 like in usual array or from 1?

Set<BluetoothDevice> pairedDevices = BA.getBondedDevices();

Answer Source

Set is an unordered Collection, the items cannot be accessed by an index.

The closest thing you can do is something like this:

BluetoothDevice firstDevice = pairedDevices.iterator().next();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download