Best Practice for handling temporary disconnections?
jones139 opened this issue · 2 comments
This is probably not an issue, more of a question, sorry!
I wondered what the best practice is for handling the situation where a peripheral goes out of range for a while, then comes back into range? I do not seem to be getting an automatic reconnection even when I make sure the peripheral is awake - it is showing as not being connected to the phone. Doing a complete re-start on the phone side restores the connection, but I would rather have the phone start trying to reconnect whenever the peripheral disconnects.
I thought that was what the 'autoconnect' method was supposed to do, but it does not seem to work (Android 13).
Is there a best practice approach to doing this?
Thanks!
Graham.
Issuing an 'autoconnect' should be sufficient. If that isn't working for you then please share relevant code and a log.