I use the Plus.API, Game.API, and Drive.API for IN-APP Purchases, LeaderBoards, and Saving game settings respectively.
Every time I enter the game the Google Play Games keeps popping up even though I refuse the login numerous times. How can I make the Games.API/Driver.API display the login only one time and if there is no INTERNET connection stop popping up until the next time the user starts the game?
This is my code:
//--------------------- Google API INIT
mGoogleApiClient = new GoogleApiClient.Builder(this)
.addConnectionCallbacks(this)
.addOnConnectionFailedListener(this)
.addApi(Plus.API).addScope(Plus.SCOPE_PLUS_LOGIN) //used for Screenshot posting and Google Account for google api services
.addApi(Games.API).addScope(Games.SCOPE_GAMES) //user for Leaderboards
.addApi(Drive.API).addScope(Drive.SCOPE_APPFOLDER) //used for Game Saving
.build();
@Override
protected void onStart() {
super.onStart();
mGoogleApiClient.connect();
}
@Override
protected void onStop() {
if (mGoogleApiClient.isConnected()) {
mGoogleApiClient.disconnect();
}
super.onStop();
}