Check if BLE connection was successful

Is there any way to check if the app is actually connected to a ble device after pressing the connect button? (without the device sending anything to the app)

Basically what block should I use to check if a connection if active or not ?

I have a connect button that turns into connected after I press it, the button initiates the connection via the ble module.

It works but sometimes the app doesn’t connect to the other device and it still turns into connected no matter if it’s actually connected or not, even if the other ble device is turned off.
The connect button is not actually aware if a connection was actually being made or not which in turn makes the app a bit dumb.

I need it to actually check if it’s connected before turning into connected.