Set arduino ble module name

I want to set the name of a BLE Module connected to an arduino, from an app on an android phone.
Can someone please guide me on how I can accomplish this?
Thanks.

We don't have enough info on your module.

Often your BT module will either be in Serial connexion mode or in configuration mode but it's not in both modes. If it's in configuration mode, you can't see it from your Android device, only the Arduino does. Once the Arduino tells the BT module to activate the SPP profile mode, then you can connect but can no longer issue AT commands to change things.

So the trick could be to pair both devices using the factory name, then for the Arduino to receive the new name and keep it in memory. The Arduino then drops the BT connexion and goes back to command mode, sets the new name (AT+NAME), and goes back to SPP mode. Your android device will likely have to pair again.