Ble Listview only showing last device seen

On my Samsung Note 10 I'm scanning for certain ble devices with a particular UUID. I'm using when device found add to listview so I can then choose and select the one I want.

This works perfect on my phone. I have since tried it on several other brands and also a Note 10 the same as mine and it only shows the last device seen.

I think its possible a developer setting I have changed or maybe a previous permission I have set some how that allows mine to work the way it should.

I can see it quickly flick through the devices as it sees them but as I said it only shows the last one seen, or the one with the highest RSSI, can't quite tell...

Anyone had anything similar? works on one phone but not the next?

I should add if I push the DeviceList to a text field all the devices are actually in the List, which makes me think its a ListView issue?? or phone issue?

I've also enabled developer options on another test phone, and check all settings are the same but still no joy.

Cheers

I think you are using Android 10, so I think you should read this:

I can see the devices. They are there, its just ListView is only showing one. So I dont think this is a permissions issue. I also had already tried it anyway before posting here, but still appreciate the info.

have you tried asking permission?
Screen1.initialize > Call Screen1.AskForPermission > "android.hardware.bluetooth_le"

I don't think I have tried that one. My Samsung A8 is at work. I'll add that permission and try it again.

I should note im using a newer version of the ble ext that was modified by Evan to get the ble broadcasting working. I could try an older extension too I guess.

thank you :+1:

yes...
the DeviceList is a list and not a csv row, isn't it?
therefore you might want to use the Listview.Elements property to assign the list...
see also the documentation User Interface

Elements
Specifies the list of choices to display.
ElementsFromString
Set the list of choices from a string of comma-separated values.

Taifun


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

Nope no difference.

Have you tried what Taifun says

I am already doing what Taifun said. LstBle is a ListView Its just renamed. The output of the device list is
MAC NAME RSSI, there for I ma using ElementsFromString where it should be exasperating at the comma. As I said. Working on my phone but no other phone I install the app to.

I can get around this issue by using a list picker button. It will just add another step. But works if I do it this way.

according to your screenshot you are using the ElementsFromString property and not the Elements property

Taifun

Ahh I see what you mean. I did try that and it just lists them all together so I can't click on one to select it. :frowning:

please provide a screenshot including Do it result

use Do it to debug your blocks, see also tip 4 here App Inventor: How to Learn | Pura Vida Apps
see also Live Development, Testing, and Debugging Tools
Taifun


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