What to do if my app crashes without disconnecting the board
Hello,
you know, sometimes apps do crash... In those cases, the connection with the board is not closed properly.
When this occurs, I have troubles reconnecting to the sensors, if I restart the app. The "Connecting" dialog goes on indefinitely.
Unfortunately your board doesn't have a reset button.
What can I do overcome this kind of issue?
Regards
you know, sometimes apps do crash... In those cases, the connection with the board is not closed properly.
When this occurs, I have troubles reconnecting to the sensors, if I restart the app. The "Connecting" dialog goes on indefinitely.
Unfortunately your board doesn't have a reset button.
What can I do overcome this kind of issue?
Regards
This discussion has been closed.
Comments
I used the code you showcased in the "starter" app.
connectAsync
call?- What exception is returned from the
No exception is thrown. The wait goes on indefinitelyconnectAsync
call?- What is the OS and model of the Android device that is failing the reconnect?
Android 6 / Lenovo TB3 730XYes. In that way I can resolve, most of the times. Sometimes I had to restart the phone. But this is not optimal and users will complain. We need a reliable way of overcoming these situations.
Thanks & Regard
Anyway, I have two questions:
connectAsync
will timeout if a connection can't be made within 10s so its task will always complete. Please post your connect and reconnect code.connectAsync
itself will never throw an exception but it may fail as detailed in its Task object. You need to add error handling to the continuation.connectAsync
if that's what you are asking.Thanks