Problem with Bluetooth connection

Hello everyone!
I hope you feel well. I'm new to this program and I don't know much about it, I hope for your help. Here is the block diagram of my code (the block diagram is taken from the Internet) when I want to connect the device via bluetooth (I press the connect button), the connection is confirmed by a black screen and nothing else



I did not formulate my question well. I can connect to the companion but when I press the Connect button I get a black screen and I can't select the bluetooth device with which I want to connect my phone, I don't understand why because I used to use a similar block diagram and everything worked but now it doesn't want to

You forgot to ask for permissions
Taifun


(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)

The easiest solution, for immediate relief
(from @Barry_Meaker) ...

I had the same issue. The problem is your app does not have permission to see nearby devices. The solution is to give your app permission on your phone (no code changes in your app).

on your phone,

  • goto settings
  • search for your app
  • in App Info for your app select Permissions
  • change Nearby Devices from Not Allowed to Allowed
  • Done

By the way, the very first time you run the app, Android will ask if you want to grant the app this permission. If you say no, or ignore the pop-up, the permission will be set as Denied. Android will not ask again.

A more complex approach, for professional app development:

See Bluetooth liste of devices deosn't work anymore - #7 by Anke
Special note for Xiaomi devices:
I have an error with bluetooth on android 12, Xiaomi Poco X3 NFC - #20 by Patryk_F

Are you sure BT is enabled?