Cómo mostrar solo los nombres de los dispositivos Bluetooth sin la dirección MAC en App Inventor

Cómo mostrar solo los nombres de los dispositivos Bluetooth sin la dirección MAC en App Inventor

Unfortunately you can't do that by default,

But here is the trick...

Using Split at Spaces

To separate the name from the MAC address, you can use the split at spaces block from the Text drawer. This block takes a text string and a space, and breaks the string into a list of substrings wherever a space is found.

  • Input: "MyBluetoothSpeaker 12:34:56:78:9A:BC"
  • Result: ["MyBluetoothSpeaker", "12:34:56:78:9A:BC"]
1 Like

The spliit should be applied to the selected address/name combination, not the entire list.

Here's my take:


Bluetooth_names_and_addresses.aia (2.9 KB)

(I am not 100% sure which comes first in each item - the Name or Address. I am working off of the block name, "AddressesAndNames".)

Sample run List Picker Elements, confirming I am right:

Muchas gracias por la ayuda. Ahora lo que quiero saber es cómo hacer para que en la aplicación se muestren los nombres completos de los dispositivos, sin que aparezcan recortados

The full device names are in the dictionary values.