kai-morich / SimpleBluetoothTerminal

Android terminal app for Bluetooth classic devices using SPP profile
MIT License
447 stars 166 forks source link

Reconnect if connection lost #30

Open dringadrian opened 2 years ago

dringadrian commented 2 years ago

Please make it reconnect if connection lost, might be checking once on a few seconds or something

mh-g commented 1 year ago

I have the same requirement for my app, which is a fork of this. Essentially, I added a feedback from TerminalFragment back to MainActivity upon connection loss and MainActivity then closes the old TerminalFragment and then restarts a new one. See mh-g/speedometer for details. (Alas, lots of other changes to the software as well, so it may be a bit hard to see the relevant changes. Among the other changes: some parsing in TerminalFragment and no UI for device selection.)

Also, I am quite new to Android and Java, so style and techniques are most likely not very good.