I actually do this when I’m discovering devices:
IntentFilter filter = new IntentFilter(BluetoothDevice.ACTION_FOUND);
this.registerReceiver(mDiscovery, filter);
And in my in my Broadcastreceiver:
String action = intent.getAction();
if (BluetoothDevice.ACTION_FOUND.equals(action)) {
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
if (device.getBondState() != BluetoothDevice.BOND_BONDED) {
And then I can do device.getName() and device.getAddress().
My problem is, I only know how to do this with an intent for the discovery. So, android devices as fair as I know have list with paired devices with their names as respective addresses.
Given the name, how can I directly (without discovery and so without a broadcast receiver) get the address?
After you created an object of your BluetoothAdapter ( let’s say mBluetoothAdatper) you can get a list with all of the bonded(paired) devices with mBluetoothAdapter.getBondedDevices().
More information on this link.