Skip to content Skip to sidebar Skip to footer

Googleapiclient Onconnectionsuspended , Should I Call Mgoogleapiclient.connect() Again?

I am using GoogleApiClient in a service to request fused location updates. Every thing is working correctly, but sometimes the connection is suspended and onConnectionSuspended i

Solution 1:

GoogleApiClient will automatically try to reconnect. You do not need to call connect() again.

Solution 2:

The onConnected() doc says the follwing:

After calling connect(), this method will be invoked asynchronously when the connect request has successfully completed.

This implies that you have to call connect() otherwise onConnected() won't be called.

Post a Comment for "Googleapiclient Onconnectionsuspended , Should I Call Mgoogleapiclient.connect() Again?"