resetAsync, board.disconnectAsync(), board.tearDown
I am a bit confused with the functions mentioned in the title. I use connectAsync to connect to a MetaMotionR board and stream accelerometer data.
I have two questions:
Sometimes the connection is lost after a while and a reconnection is not done automatically, yet if I go out of range of my mobile phone, it reconnects automatically afterwards.
Maybe this is the same problem as mentioned here:
What is the best way to handle those disconnections?
board.onUnexpectedDisconnect(new MetaWearBoard.UnexpectedDisconnectHandler() and then connect to the board again. Do I have to tearDown everything before connecting again to the board?
Now I also saw the function
settings.onDisconnectAsync. Whats the difference?
2. Sometimes after disconnecting the next connection fails. So I asked myself how to disconnect properly ?
Is it better to use
disconnectAsync and then
resetAsync. And shoudl I unbind the Bluetooth Service as well?
I hope someone has an answer to so many questions