How manage Connect block with a timeout?

23 views
Skip to first unread message
Assigned to chrisw...@gmail.com by me

cappe

unread,
May 7, 2019, 7:11:49 PM5/7/19
to MIT App Inventor Forum
Hi everyone,

I ask a question about an issue at this link but a I 'close the question' too quickly.

With what suggested ( and how is in the attachments ) I modified the code but the problem is still in the BT.Connect block.

BT.Connect is blocking, right? How can I avoid to wait until my app go freeze?

thanks
Schermata da 2019-05-08 00-44-23.png
Schermata da 2019-05-08 00-46-37.png
Schermata da 2019-05-08 00-46-57.png

Chris Ward

unread,
May 7, 2019, 7:58:24 PM5/7/19
to MIT App Inventor Forum
Hi cappe

Nice try but you haven't done what was suggested. The Clock Timer should be Sending the data one-at-a-time to each device in the List. 

I will put together an example for you.

Chris Ward

unread,
May 7, 2019, 8:36:29 PM5/7/19
to MIT App Inventor Forum
Hi again cappe

Next time you need to post an image of your Blocks, do this (for an image we can actually read!)
https://www.professorcad.co.uk/appinventortips#TipsBlocks    How to create an image of your Blocks and add it to your Forum Post


This is how a Timer can send data to multiple devices, one-at-a-time:

SendDataToMultipleDevices.png


Note, code is not tested here but should work(!). Test as an APK on your Android Device.



Reply all
Reply to author
Forward
0 new messages