Need Help In Bluetooth Permission for an app on Android 12

can you share this .aia file


What about posting a screenshot of my TestBTConnect2.apk (post [#48]

in my post #52 , this is not exactly the screenshot of your original TestBTConnect.aia . I add mainly the call BluetoothClient Connect , where precisely the problem occur, and call this new aia as " BluetoothClient_AI2test_withConnection.aia"

Post a screenshot of this APK after the first run:

here is the screenshot of this apk after the BTclient Call , from my phone ( but works from the tablet :slight_smile: )


So, as I assumed, both permissions are requested and granted. In addition, the BTClient_AddressesAndNames are found/displayed.

The main reason for my last test APK was to show that both permissions are requested/granted and the BT devices are shown. And I proved that, didn't I.

You claimed that this was not the case (for your "first phone"):

Hi Anke

Sorry for the confusion, but yes I confirm that your aia succeed to ask me the permissions on the phone.
However the original bug problem is not there in fact but when we call the BluetoothClient adress, after .
As far as I can see, this problem is tricky for me, because it s work on some android device in android 12/ SDK31 but doesn't work and create this bug on some other ( even with the same 12/31 ) .
Could be a problem of parameter in each phone, security level or something else ; Don't really know .

Use Logcat to identify the error. And post stack trace.

Analyze a stack trace  |  Android Developers.

Can you please share that file in .aia format
Apk file can't be imported in mit app inventor

Hi thanks for the reply
where can i find the marked blocks

Hi Anke
I don't know if it could help you, but you will find the two debug files , I have done, with adb you mentionned (I didn't know adb procedure ) :
One for the phone with the BTClient bug , and another one with the tablet where all is OK .Same APP of course .

logging_adb_testBUG.txt (258.9 KB)
logging_adb_testOK.txt (343.3 KB)

What I did during those test debug period is : open the APP ( BluetoothClient_AI2test_withConnection ), connect to one BT device , and stop .

I am wondering if someone else has also, like me, this new trouble with BT classic when Calling Bluetooth Client Adress finally ? Could it be useful to gather who has the same trouble and in which type of Android device ?

I also have a similar problem. The app that used to work fine 2 years ago, is not working now, after rebuilding the same .aia file today. When i click the list picker of bluettoh, the screen shows the list of previously connected bluetooth deives. And when i click on the desired bluetooth device from the list, i am getting the RunTime Bluetooth permission error. Can someone pls help me
BT_Permission_Testing.aia (2.1 KB)

I have the same problem. Please if you can solve this problem share the solution

Small update. The newly built app is working fine with Android 10.
But fails to work with Android 12


I updated the extension, but it's still not working

Show it, like this:

BLE version


1 Like

Hi all.
I'm currently facing the same issue. Trying to connect to a Bluetooth device (HC-05 module) using BluetoothClinet on my Xiomi Mi 11Tpro (Android 12, API 31) with the same result as described above.

To have a better picture of the issue below you can find screens from running the "BluetoothClient_AI2test_withConnection"

Dosen't matter what app I will try to build, I get the same result shown in the picture that appears after trying to connect.

What is wondering is why running the app requires this permission on my phone (API 31).
if I understand correctly according to the information under this link

this permission is required for the older SDK version?

Hi Anke, I have seen many of your posts giving solutions to issues related to MIT app inventor. I need your kind support here.
We need solution for the classic Bluetooth client. Here are 2 scenarios.

  1. App developed and apk built on MIT app inventor 2 years ago is working fine with Android 10 as well as Android 12.
  2. The same app is just rebuilt to generate new apk ( blocks and designer is same as that of the app developed 2 years ago). But the newly built apk is not working on Android 12 but works well with Android 10.

Hi Chris,
My first intention is to establish BT connectivity between microbit and mobile phone android 12.

If I am able to successfully send a message to mobile and can display it on label then will proceed with further development of the application.

BT version I need to check and will reply back again.

Both devices are paired with each other.