No aparecen elementos en la lista del bluetooth

Hola, estoy usando listas


Cuando abro el list picker (listbluetooth), no me aparecen elementos

Porque ocurre esto?
Para mi es un problema porque necesito conectar un dispositivo a la app para controlarlo, por ejemplo un carro

1 Like

Translation:
Hello, I am using lists

When I open the list picker (listbluetooth), no items appear

Why does this happen?
For me it is a problem because I need to connect a device to the app to control it, for example a car.

You probably need to give a little time for the device addresses to be found. Use a Clock Timer.

Here is an example project that uses a Clock Timer to give the scan time to find available devices.

BT_Basic_Setup.aia (7.6 KB)

Note that your device and the others must have Bluetooth switched on.

Hola. No sé si lo has podido solucionar. Llevo muchos programas armados sin problema alguno. Pero ahora hace un mes, me sucedió lo mismo: no aparecen elementos en la lista Bluetooth. Entendí podría estar haciendo algo mal, y después de desechar varios programas que había hecho y no funcionaba la lista, decidí descargar y reinstalar uno de los programas anteriores que sí funcionaba y oh sorpresa! Esos programas que listaban elementos anteriormente ahora tampoco me los mostraba. Entendí que podía hacer un problema del programa pero luego se me ocurrió probar con otro Android. Para sorpresa mía, en otros dispositivos sí funciona correctamente! Tengo un Moto G200 y además de esto me genera entrecortamientos en la transmisión bluetooth a muy corta distancia. No sé si será un problema electrónico o alguna actualización que me genera este inconveniente. Lo cierto es que he decidido cambiar de móvil porque también necesito que funcione. Y le funciona a todos menos a mí. Y esto lo descubrí recién hace un mes porque anteriormente funcionaba sin problema. No sé si lo has podido solucionar de alguna manera, aguardo comentario gracias.

Since Android 12, you have to ask users for bluetooth_connect and bluetooth_scan permissions.

1 Like

Taifun

O meu problema é o mesmo, podes mandar o mesmo link mas no formato apk?

So what about using the same solution and ask for permissions?

Taifun

A post was split to a new topic: Bluetooth permissions in iOS

hola , sigo teniendo el mismo problema despues de haber preguntando por permisos para el uso de bluetooth , al iniciar la aplicacion me pregunta como lo debe hacer , pero al ingresar a la "lista de dispositivos bluetooth " sigue sin mostrarme nada

1 Like

(Canned Response)
These blocks can be dragged into your Blocks Editor to request permission(s) for Bluetooth scanning and connecting. All three parts are needed.




Thanks to @Anke for the original code.
My changes include

  • use of the Screen1 permission blocks to avoid the possibility of a typo
  • using a TinyDB tag particular to BT permissions and only for BT permissions.

by @ABG

Taifun

Encontre el error chaval, solo entra a las configuraciones de tu apk y otorga permisos al bluetooth o conexion con dispositivos cercanos

3 Likes

¡Muchas gracias! ¡Tenias razón, ya tenia buscando rato esta solución!

Muchas gracias amigo, eres el único que me dio la solución real.


Mi problema es que en mi aplicación no aparece ninguna lista para conectarme en bluetooth(aparece en blanco), pero si descargo una aplicación de playstore, puedo conectarme sin problema. A que se debe esto?

it looks like you forgot to ask for the necessary permissions...
read this thread from the beginning or see below
Taifun


(Canned Response ABG - Bluetooth non-BLE SCAN Permission Blocks)

The easiest solution, for immediate relief
(from @Barry_Meaker) ...

I had the same issue. The problem is your app does not have permission to see nearby devices. The solution is to give your app permission on your phone (no code changes in your app).

on your phone,

  • goto settings
  • search for your app
  • in App Info for your app select Permissions
  • change Nearby Devices from Not Allowed to Allowed
  • Done

By the way, the very first time you run the app, Android will ask if you want to grant the app this permission. If you say no, or ignore the pop-up, the permission will be set as Denied. Android will not ask again.

A more complex approach, for professional app development:

See Bluetooth liste of devices deosn't work anymore - #7 by Anke
Special note for Xiaomi devices:
I have an error with bluetooth on android 12, Xiaomi Poco X3 NFC - #20 by Patryk_F