Notifier and Auto disconnect when bluetooth lose its power/input voltage

Hi! Please help me what to code for this problem:
I have goal that after my bluetooth is connected to my phone, I want my phone notify me "no power on your bluetooth module" and disconnect the bluetoothclient whenever bluetooth module lose its input voltage(totally no power/not operating). What should blocks should i use? thank you!