GoogleApiClient onConnectionSuspended,我应该再次调用mGoogleApiClient.connect()吗?

我在服务中使用GoogleApiClient来请求融合位置更新。 每件事情都正常工作,但有时连接被挂起,onConnectionSuspended被调用。

@Override public void onCreate() { ... mGoogleApiClient = new GoogleApiClient.Builder(this) // this is a Context .addApi(LocationServices.API) .addConnectionCallbacks(this) // this is a [GoogleApiClient.ConnectionCallbacks][1] .addOnConnectionFailedListener(this) // .build(); mGoogleApiClient.connect(); ... } @Override public void onConnectionSuspended(int arg0) { // what should i do here ? should i call mGoogleApiClient.connect() again ? ? } 

在上面的链接(ConnectionCallback文档)中说:

应用程序应该禁用需要该服务的UI组件,并等待对onConnected(Bundle)的调用以重新启用它们。

但是如何调用onConnected将会发生? 我应该再次调用mGoogleApiClient.connect()吗? 或者即使在连接暂停之后,mGoogleApiClient也会继续尝试连接?

Solutions Collecting From Web of "GoogleApiClient onConnectionSuspended,我应该再次调用mGoogleApiClient.connect()吗?"