How do I extract a future BLE connection from ListView?

Hello,

I hate to sound like a broken record but I am truly lost and all previous suggestions have failed to accomplish my objective. This should be so very simple and I would expect that many have already succeeded at this endeavor.

I have a functioning ListView that allows me to select a BLE address from the list and connect with it. I would like to store that selection to be used the next time the operator turns on the app. The prompt is to connect to the previously connect device. The two blocks shown below are from the connect from list switch (Connect) and connect from memory switch (Connect_Stored_Value).

I have been running in circles and pounding my head against the wall a lot so I hope someone can help me save my remaining wall space from dents. I simply need to know how to recall a previously selected BLE address and I have tried several ways, as demonstrated by the screenshot error messages.

Would some kind super-user please tell me what I need to do to accomplish this or direct me to an example where this has been achieved? I have gotten several hints and suggestions but they elude me, and I am unable to establish the emulator, I can only download .apk files to me Android phone for testing. Thank you so much for any assistance that can help me get a handle on this.

That BLE Connect with index block is trouble, if you're expecting to find the same collection of possible things to Connect to in the same exact order on a subsequent run.

So I looked at the BLE Blocks pallette, in the Connect section, and I see
image

I see three other Connect blocks you could try, depending on what you saved in TinyDB from the last connection.

I have no BLE hardware, so the ball is in your court.

Thank you so much for the suggestion of shopping for another BluetoothLE1 scheme. I am using the .Index to select from a list and storing the UUID in TinyDB. No matter what, the BLE device will always be called "Psychrometer" so all I needed to Recall was the stored UUID value. It occurred to me that I was doing something wrong with the .Index stuff when I started showing index locations (1, 2, 3, etc.) instead of content. That was an Ah-Ha moment and your suggestion got me fixed up. I have been chasing this for several days, now. Below is the corrected code that I used. Thank you, again!

Looking up things by index is perilous in an environment where you don't control everything.

I learned this from The Three Stooges' coffee and painting gags:

https://www.dailymotion.com/video/x6xfmyf

So far, so good. I simply display a list and select the device I want. I then connect to it and everything is hunky door E. So far . . .

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