Android permissions - BLE - Android 12

il m'affiche le message suivant dans appinventor
Need android.permission.BLUETOOTH_SCAN permission for AttributionSource { uid = 10686, packageName = edu.mit.appinventor.aicompanion3, attributionTag = null, token = android.os.BinderProxy@9e88c90, next = null }: GattService registerScanner
Note: Vous n'allez pas voir une autre erreur rapportée pour 5 secondes.

aide svp

see this thread

Taifun
PS: I now moved youor question and related answers to the correct thread...

This is an issue related to the Android 12 update. The currently published BluetoothLE extension is not aware of Google's latest changes to Bluetooth, and so it fails for that reason. You should be able to use the AskForPermission block to request the BLUETOOTH_SCAN and BLUETOOTH_CONNECT permissions to connect to BLE devices on Android 12+.

Edit: I should mention that I am in the process of updating the BLE extension to address the changes in Android 12. Please keep an eye on the IOT category of this community for the update announcement.

1 Like

bravo Anke
je vous remercie pour l'effort fournis
normalement ca va bien marcher
mais a quoi sert l'extension GetApilevel1

merci infiniment

1 Like

Btw, search ...

Great, thanks, this saved me.

Hi Anke, your aia blocks worked fine with two synchronised BLE devices and only needed to be implemented once, many thanks, Peter

1 Like

Thanks, it helped me as well.

1 Like

Hi.
Thanks to Anke's help, it is getting better, but with Android 11 sdk v30,I have the msg that the permission ACCESS_FINE_LOCATION has been denied and that I should enable it in the app settings.

It aready asked for granting access to location right before ( the "common" location request ) so the main location authorization is there.

I have read on Internet that for Android 11, on Java; it also needs "coarse" and "background" location authorization requesst. I have tried again for "coarse", no change. And I do not see a "background" location inside the available authorization list.

I moved all authorization request blocks up before any scanning operation. No luck.

It would really help if you provided a screenshot of your relevant blocks, so we can see what you are trying to do, and where the problem may be.

To get an image of your blocks, right click in the Blocks Editor and select "Download Blocks as Image". You might want to use an image editor to crop etc. if required. Then post it here in the community.

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

grafik

Did you enable Location in the device settings?

1 Like

Good day Anke.
Yes.

Did you try my test APK, posted in post #24?

No, sorry, as a in-house rule, I do not install apks from third parties :wink:

Hi Peter.
On what Android version have you tested please ?
Thanks

As you can see, there is also an AIA in post #24.
So again, did you try the APK (built from my test AIA)?

Thanks for caring Anke, especially at this time of the day.
I know it must be annoying when you spend time helping and you get the feeling people do not read 100% of what you write.
It is running fine now.
The trick was to go to android settings and allow for location BEFORE running the app, and NOT run the app then wait for location permission question as it would not work even when the question is answered.