Android Question Yet another BT-comms question...

Mickster

Active Member
Licensed User
Longtime User
Hey guys,

I know how this topic has been beat to death but I can't, for the life of me figure out how to make this happen.

My tablet needs to communicate with a BT device that is set-up as the master and configured to auto-connect/reconnect.

In the Android "RFO Basic", I simply use the following:

B4X:
BT.Open

'No need to "BT.Connect" because the other device is auto-connecting 
'"to the last paired device"

Do
   BT.Status s

   If s = 3

      'I can now send/receive data. Moving out of range makes 's' < 3 so I simply wait 
      'for s = 3 and comms resume.

   Endif

Until

BT.Close

I wonder if there is a bare-bones example that will let me achieve the same in B4A?
Of course, I understand that the B4A equivalent will be event driven.
 

Mickster

Active Member
Licensed User
Longtime User
Hi Erel,

Yeah, I've been trying this but cannot make the connected event happen. This particular B4A app has been using the regular BT-comms method for five years, now but I can't make this "listen" approach work. I know that I am missing something silly and consulting the forum is usually a last resort but I thought that there might be a simple bare-bones example of what I'm trying to achieve(?)

Regards,

Mickster
 
Upvote 0
Top