My app does not detect bluetooth devices (Scanning devices)

Hello, I am developing an application to be able to connect to my BLE. I did something like this that I saw in a video, except when I click to scan it doesn't detect any devices, not just my BLE! Normally I detect 4-5 devices around me but nothing is showing at all. When I open the application I have an error 908.

I have the impression that this is a problem with permissions. (I activated everything on my phone, I authorized everything too ..)

Thanks !

the bluetooth client component is used for bluetooth classic, but not for BLE...
use the BLE extension instead

btw. you only have to ask for dangerous permissions, see also List of Android permissions normal permissions and dangerous permissions in API 23? - Stack Overflow


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

1 Like

Thank you for your answer !

I have some questions :

  • You said I ask for dangerous permissions, can you tell me what are the permissions i have to take, and what do i have to do with them ? Add them in manifest.xml or i can do it like that : image (btw. should I keep the "askforpermission" or I can remove it ?) ?

And Ok, I will you the BLE extension, but that's not because of that I can't see devices, is it because of the permission ?

Thank you !

none, just remove that block

yes, use the correct extension

Okay, you sent me the list of dangerous permissions, but how can I ask for them ?

why do you think you have to ask for these permissions?
usually the App Inventor components already provide everything you need whithout you having to ask for any permissions...


I don't know... I just want to know please how can I ask for them, just that...

Edit : Maybe we should ask permissions because these permissions could be dangerous when activated ?

The "AdressesAndNames" block will not show you the found devices. This block shows the devices that are already paired with your phone. And it's not a permission issue, permissions are not needed here, you can delete them.
The blocks you showed will be able to connect to a classic BT module, such as hc05, hc06, xm15b etc. If you want to connect to a BLE module, e.g. hm-10, you have to use the ble extension, as Taifun wrote.

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