Crash a la hora de conectar el bluetooth

Hola, buenas noches, tengo un problema a la hora de conectar el bluetooth con mi Raspberry Pi 3, cuando le doy los permisos que necesita para buscar los dispositivos, lo encuentra pero a la hora de conectarlo me crashea. Alguna ayuda porfa???

(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

In the first time I use scan, it show me the pop up of permission and I accept

As far as Ican see your blocks look fine for the first time you start the app... does it still work the secobmnrmd time after you already granted the permissions? See @ABG 's post what needs to be done...

Concerning the crash, to find out what happens, use logcat


You might have to ask for scan permission before asking for connect permission.

That shouldn't matter.

Android version? Device name / model?


Try this instead:

(And next time please post English blocks.)

Android version 12,
Model BlackView4900 pro