Need to connect to either of the ESP32 devices in range, using Bluetoothclient

Hi, the app I have designed should be able to connect to either one of the esp32 devices through the BluetoothClient function, i.e. whichever of them is in range but both of them are in the active state. Is there a way to call the BluetoothClient function and choose an address in a list of addresses or is there any other way?
I've uploaded my bluetooth connection block, help would be appreciated.

Hello Akhil

If the ESP32 devices were manufactured in 2019 or later, they are probably BLE (Bluetooth Low Energy) devices, not Classic Bluetooth.

When you scan for devices, make a List View or List Picker with the results. However, first of all find out the Bluetooth version of those devices and let us know.

ProfessorCad: Tips & Tricks Bluetooth
ProfessorCad: Tips & Tricks Bluetooth Failure