Android Question How to detect connection lost on Bluetooth

EduardoElias

Well-Known Member
Licensed User
Longtime User
I made a simple program that is reading a scale, I have connected it to a serial to bluetooth converter.

It connects and works fine. But there are situations that the connection drop, or someone turn off the equipment and turn on, then the connection is lost.

I am using Serial and AsyncStreams to talks with the bluetooth.

I want to know how to detect that there is not bluetooth connection anymore and how to restore it.
 

SoyEli

Active Member
Licensed User
Longtime User
Hello:

I'm no expert but I might have the solution, just having a little problam compiling into a library.
Mr. Erel is checking into the compiling error.
Will let you know as soon as I have a good working library.

Thanks
:)
 
Upvote 0

TheMightySwe

Active Member
Licensed User
Longtime User
I mean an already paired device where you already have the device MAC-adress.Now I just try to connect to the device over and over again until it connects. Not the best solution, but it works.
 
Upvote 0
Top