How to connect BLE automatically when in range?

hello experts, recently i learned more about MIT APP..

I want to ask about an ESP32 Dev Module I have where BLE is already built in.

anyone want to tell how i can make an apk that can auto-connect when in range with BLE?

It's simple: when BLE is in range, it is connected, when it is out of range, BLE is not connected. then show notification in written form when connected or not.