Need Help In Bluetooth Permission for an app on Android 12

Hello Sudarshan

Please see my post #4, you are not asking for enough permissions (location is required). When prompted, I assume you allow them? Or is the prompt not popping up?

Hi Chris,
I have given permission.
But can you help with steps to give permissions (link)

Also can u send link of your post#4

Thanks in advance

Hello Airsig3d

Your code is not requesting the permissions stated in my post#15.

  1. What is your phone's Android version?
  2. What is your phone's Bluetooth version?
  3. What is the target device's Bluetooth version?
  4. Are you checking that Bluetooth is switched on (both devices)?

The code is also chopping out the address part of the device address (without verifying success) - yet that is unnecessary, you can just use the address as-is.

Hi again Sudarshan - sorry, I didn't notice this was your first time on the forum - Welcome!

Your post in this topic is #21; scroll up to see my post#4.

What is the version of the BLE Extension you are using?

Can't see enough of your code to know if it is correct.

There isn't really a need to have a button for every stage of the process - when one stage is complete, it can auto-start the next.

  1. What is the Bluetooth version of your phone?
  2. What is the Bluetooth version of your target device?
  3. Are you checking that Bluetooth is switched on (both devices)?

I note the distinct lack of UUID's. What exactly does your Project do?

Note that with the latest release BLE will be broken even with the workaround people have been using of adding a BluetoothClient component. This is because the permissions are now selectively applied. I'm working on an updated version of BLE that is compatible with Android 12.


Hello Everyone - if you are using BLE with Android 12, please note Evan Patton's post#25. You will need to wait for an extension update, or use a phone with Android 11 or below.

Muchas gracias y suerte con la solución

Hi Chris
I am using android12 phone + BT classic for both my phone and the device and my BT are switchon .
As Akash in post#7 , al was allright a few days ago .
I change slighly the permissions and I have now :

but this big problem is still there ,

Try this (Companion & APK):

What exactly are you trying to connect to? You have not answered my questions in post#23.

Just to clarify more, you are running an Android 12 phone, it is probably using BLE.

Hi Anke

I simplify my aia to avoid confusion, and tried your solution. I can confirm that I am working on API 31 and Android12.
The problem occured exactly when I ask the Bluetoothclient.connection with the correct adress
TestBTConnect.aia (423.2 KB)

1 Like

this is Strange.
I just tested now my aia on another phone, with exactly the same caracteristics ( API31/ android12) but its works!
the only difference is that this phone asks me the "autorisation to detect other device nearby" once , where the first phone doesn't ask .
Itr come then effectivelly from the server side ...

As mentioned before, there is no need to split-up the address - this might be the cause of your issue.

Further down the line there will likely be more issues but we cannot help you if you are unwilling to answer our questions.

That may be a forgiving 'developer mode'.

Hi Chris
I tried to answer youre previous question . I am using BTclassic and not BLE and I am connecting a BT classic device .
I test without splitting the adress , and this is the same on the first phone . I tested also to switch off the developper mode of the phone( I had this ) , but still the same.
The conventional

is enough , when I use the other phone.
I only need now to make understand th ephone to ask me somewhere the permissions to detect other device.

Please answer all of my questions - they are numbered to make it easy for you. The devil is in the detail so for example "connecting a BT classic device" does not tell us enough. The detail about the phones is not enough. Make/Model/Bluetooth Version of each Android 12 phone. If you search the forum for Bluetooth Topics you will then understand what a huge difference detailed information makes.

More haste, less speed. If you try to do things too quickly it will take you longer in the end.

1 Like

Thanks Chris
my BT device is a arduino device but doesn't matter . For any BRT device in my phone memory , I have the same bug.
The problem is in the phone itself .

Phone where I have problem :
I precise you that I use a Xiaomi 11TT pro /MIUI 13.016.0 / android 12SKQ1.211006.001/ last security update : 2022-09.01

Phone where I don't have still BT problem :
the other "phone" is in fact a tablet galaxy Tab S6 lite /SM p610 / one UI :4.1 / androidversion 12 /
last Secu Android coorectif : 1 july 2022 .
Note that effectively currently the galaxy is requesting a update ( (coorectif of the 1/10/22)

Hope that will help you ...

Try to uninstall the app before reinstalling the APK.

Does this app request permissions on your test devices?

HI Anke
since your post#28 , I was testing my aia with companion only but I tested my original apk with the usual permission Bluetoooth_connect on the other phone without problem .
I will try howver to build an apk , but I am rather pessimistic.

I confirm you HOWEWER that your BluetoothClient_AI2test.apk is asking the permission to test devices on my first phone ( the one where I have the problem ) .
That sound very good .
I will try to find your Aia maybe to better understand how you do it .
Many thanks