I have this issue:
GoogleApiClient.ConnectionCallbacks methods not being called after connecting to the GoogleApiClient
But the callbacks have been added but still no onConnection callback and no errors why would that be? Can anyone help?
My code:
public class MainActivity extends Activity implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener { private GoogleApiClient mGoogleApiClient ;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
initGoogleApiClient();
}
private void initGoogleApiClient() {
mGoogleApiClient = new GoogleApiClient.Builder( this )
.addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN)
.addApi(Games.API).addScope(Games.SCOPE_GAMES)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.build();
mGoogleApiClient.connect();
}
@Override
public void onConnected(Bundle bundle) {
}
@Override
public void onConnectionSuspended(int i) {
}
@Override
protected void onDestroy() {
super.onDestroy();
mGoogleApiClient.disconnect();
}
@Override
public void onConnectionFailed(com.google.android.gms.common.ConnectionResult connectionResult) {
}