I saw this question in the appeal of OnConnecctionSuspended ().
stack overflow
I have an activity where I try to track KM sent from the source to the destination when the user presses the start button (start) and then clicks the stop button (Destination). The problem is that it works fine for some 1.5-2 KM, after which the connection is suspended with reason 1, for which the google document says: "CAUSE_SERVICE_DISCONNECTED" - the reason for the suspension informing that the service was killed. According to hounshell's answer , it will automatically try to connect, and we do not need to call the googleApiClient.connect () method again. I registered actions and trying to connect.
Logs 333.211038: 05, onConnectionSuspended (int cause) - is mGoogleApiClient connected? = true 334.211038: 05, onConnectionSuspended (int cause) - is mGoogleApiClient connected? = false
But even after 2 minutes with my phone outdoors with a clear sky, etc., this is not a connection. I have to restart the activity in order to get the connection again. Can someone help me?
source
share