App won't retrieve UUIDs from a connected device

I am still having trouble with my bluetoothLE program.

The app is intended to send data between two smartphones, one is a android on version 8.1.0, and the other is a Note 20 ultra which i dont know the version of. right now i am just trying to get it to retrieve the UUIDs from a connected device.

I have defined the wifi address and bluetooth address for each of the phones that the app is intended for.
The app uses two procedures, one uses the call.AdvertiserServiceUuids block to fill a list with serviceUUIDs. The other procedure uses the result from the first procedure to fill another list with supported characteristic UUIDs for the service.
the_app.aia (142.7 KB)

When i run the app and click the button which is supposed to retrieve the data, this error appears

it looks like its saying that something with the value null is being referenced. I looked at my code and it seems like for whatever reason the lists are not being filled when the procedures are called. So when i try to tell it to set the text in the labels to this data, it gives me an error.

Another likely cause is that my app doesn't have permission to access a connected device. could someone show me a example of how i could give my app these permissions? Or a general example of how to send data between two smartphones with BLE.

1 Like

Is there a particular reason to use the AdvertiserServiceUuids rather than just connecting to the device and using the DeviceServices property?


no i guess there isn't. I implemented the change and as far as i can tell it didn't affect anything.

But i did find something interesting, i tested the app on my brothers tablet, and disabled a setting which prevents third party apps from being installed, and also gives permissions to any connected device. I ran the app and it shows UUIDs for my phone! (thats what i assume they are). So the problem seems to be with the app permissions. so how would i give an app permission to send data via bluetooth.

1 Like

Hello, I made a small application to show the services and characteristics of the connected device, to achieve this I have had to do some experiments, since I am not a programmer and I do not have much experience with Appinventor, I share some images, a link to a small video of demo and the app, I hope to help you, greetings

Captura de Pantalla 2021-12-04 a la(s) 9.36.33
Captura de Pantalla 2021-12-04 a la(s) 9.37.01
BLE_Scan_Select_ReadString.aia (206.3 KB)

wow! This is really cool, thanks so much! I wish there were some comments in the program though, its difficult to fully understand everything thats going on here.

1 Like

Hello, I will make the comments of the blocks, I hope it does not get lost in the translation with google translate, since English is not my language.

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