Connecting device to wifi

hi all

I'm currently working on a IoT waste management system. I'm using an ESP32 to connect to wi-fi and display data in the app. Currently I hard code my ssid and password in the esp32 program code. I'm wondering is it possible to connect to the esp32 to the app via bluetooth and connect the esp32 to a network through my app

any help greatly appreciated

Yes it is possible. But you can also use wifimanager on your ESP32 to connect to wifi, or you start your ESP32 in AP mode, connect your phone to it, then send the wifi credentials to it and connect it in Station mode. Your choice.