Bluetooth problem with server on Android 13

I download the btchat.aia from the forum and compiled it. It would work on Android 9 & 13.
I then created an app which only used the Bluetooth Server component.
When compiled this app got a permission error for Bluetooth_Connect on Android 13 but worked in the AI Companion on Android 13 and compiled on Android 9.
Eventually I tried adding the Bluetooth Client component which is not used in the Blocks.
This fixed the problem.
Is there some permission setting missing from the Bluetooth Server component?

Try to ask for these permissions


Tried this and added a permission denied block. This was triggered.
I then tried using the permission block for Bluetooth as no Bluetooth_Connect option was available but neither granted or denied blocks were triggered and the error was shown.

Show your (relevant) blocks and also post the aia (or a small test aia).

What prevents you from using exactly those blocks from the link I posted earlier?


Sorry for the confusion. Having reread my post it is not clear.
I first tried the exact blocks you linked to. Still got the error.
I then added output to the screen to track what was happening and a premissiondenied block. This showed that BLUETOOTH_CONNECT permission was not granted.
The permission list with the askforpermission block does not have BLUETOOTH_CONNECT in it.
I tried the Bluetooth one.
All with no success.
The problem is only with an .apk file on Android 13. The original app works in the AI Companion and as a .apk on Android 9
I have attached a .aia file of the bluetooth blocks. The start button causes the error

Transfer.aia (3.2 KB)

I tried your example project, no window pops up, which asks for permission... and after pressing "Start" I get the message "Need android.permission.BLUETOOTH_CONNECT permission ...", which let's me assume, that permission is missing in the manifest...

just do this as temporary workaround until the App Inventor team fixes this issue...


Thanks for confirming my thought that the problem was with the Bluetooth server component.

... does not exist on Android < 12. Therefore, this permission is denied on Android < 12.
Solution: Request it only on Android 12+.

See also here:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.