In this question, @nhoxbypass provides this method for the purpose of adding found Bluetooth devices to a list:
private BroadcastReceiver myReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Message msg = Message.obtain();
String action = intent.getAction();
if(BluetoothDevice.ACTION_FOUND.equals(action)){
//Found, add to a device list
}
}
};
However, I do not understand how a reference to the found device can be obtained, how can this be done?
I do not have permission to comment on the original question, so I have chosen to extend it here.