Error 908: The permission BLUETOOTH.CONNECT has been denied (on Android ≤ 10)

What Bluetooth are you using? If BT Classic, you do not need to request permissions, App Inventor does that for you.

1 Like

There still is an issue which must be fixed after the SDK31 release... Your blocks look fine, see also this working solution

I currently do not know what might be wrong... You might want to provide sone more relevant blocks...
.
.Taifun

thanks, but still not working. I´m using BT classic.
I removed the lines for permision, but it not work

Thanks, but for android 10 it don't work

What exactly are you trying to connect to Juan?

Thanks @Anke , Now I did not have the error 908, but I can´t get the Bluetooth device list.
This is the code that I´m using:
image

Hi Chris, i´m trying to connect a Arduino UNO board.
I did it with a cellphone with Android 11, but with my Table that have Android 10, is not work.

According to the article, the permission Bluetooth is not a dangerous permission, which means, you need it only in the manifest, you do not have to ask for it

And AccessFineLocation is only required, if your app uses Bluetooth scan results to derive physical location.

However also for older devices you have to ask for BluetoothConnect and BluetoothScan...

Which means your first screenshot actually was the better version... My guess is, the permissions in the manifest are incomplete for older devices... to find it out, decompile your app and check the manifest .. how to do it is explained here How to build a big app → APK max. 100 MB or → AAB 150 MB

Taifun

1 Like

Another question Juan - You are doing something different to everyone else, running Bluetooth from Screen2 instead of Screen1. Why is that?

So you have an UNO - what BT Module are you using with it?
ProfessorCad: Tips & Tricks Bluetooth
ProfessorCad: Tips & Tricks Arduino

Try this one (it should work on all Android versions):

EDIT: (Google Drive link to APK removed) see post #34

Check it out on your Android 10 device and report back.

Note: BLUETOOTH_CONNECT permission in not available on Android ≤ 10.
Therefore you get "Error 908" on devices with Android ≤ 10. @Juan_Desa

I have adjusted the topic accordingly.

1 Like

@Juan_Desa Does my test APK work for you (on both devices, Android 10 and 11)?

.... Juan, make sure your Tablet really is on Android 10, it could have upgraded to Android 12L, which is specific to Tablets and other large-screen devices.

Hi @Anke , I tested your App BluetothClient.apk but I got the errror: 503.

Hello Chris, yes is Android 10.

Did you enable Bluetooth in the device Settings?

1 Like

Hello @Anke , now is working.
I added the HC-06 to Bluetooth devices and put the pin to 1234 and then it worked.

To what extent should that be the solution in relation to your question/ topic?