How do i scan for bluetooth devices?

Hi, what i am trying to do is scan for bluetooth devices and also check if the device has bluetooth and if its already connected to the watchdog.

But nothing seems to work, i also get error 908, dont know why. Also the list is not showing.
Is there any platform which explains the kodular?

it is not possible to enable Bluetooth programmatically anymore…

In Android API 33+ this method is deprecated. Enabling/disabling bluetooth without user consent is not more possible. You should use android.bluetooth.adapter.action.REQUEST_ENABLE instead.

When exactly do you get the error message? Can you provide the complete 908 error message? As far as I can see, the blocks look fine…

Alternatively you could use the Bluetooth extension App Inventor Extensions: Bluetooth | Pura Vida Apps which has been tested for sdk 34…

Taifun

It worked for Android Version 11 it think, but now i am on version 13. I have read that i have to use : android.permission.BLUETOOTH
android.permission.BLUETOOTH_SCAN

There is no Problem, but i have to activate bluetoote manuell, i want it to be automatic.

Aa already mentioned this is not possible anymore, read my previous answer
Taifun