Mobile bluetooth as proximity sensor

Hi,
I want to use my mobile phone to open the gate via BlueTooth and esp32.
Has anybody used the above scenario? please help me ,

Thanks & Regards,

Aslam