Basically, Android Google Sign In is flashing a small empty white box after the user presses the sign in button and before Google finishes the sign in process. This all happens pretty fast but I would like to get rid of the white box. I assume this white box is a failed attempt to show a progress bar.
Edit: Adding a graphical recreation of what is happening...
I'm testing on Samsung Tab 3.
This problem does not include the situation where the user is signing in for the first time or after access has been revoked.
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken(getString(R.string.google_server_client_id))
.build();
// google login stuff
googlebutton = (com.google.android.gms.common.SignInButton) findViewById(R.id.googlebutton);
googlebutton.setOnClickListener(this);
googlebutton.setStyle(SignInButton.SIZE_STANDARD, SignInButton.COLOR_LIGHT);
// Build GoogleApiClient with access to basic profile
mGoogleApiClient = new GoogleApiClient.Builder(this)
.enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.build();
and the sign in function...
private void gSignIn() {
Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);
startActivityForResult(signInIntent, RC_SIGN_IN);
}
Ideally, I would like to restore the normal progress bar behaviour.
Here is my gradle...
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.0'
defaultConfig {
applicationId "xxxxxxxxx"
minSdkVersion 17
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
//compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.android.support:design:23.0.1'
}
question from:
https://stackoverflow.com/questions/34599990/android-google-sign-in-is-flashing-a-small-empty-white-box-while-signing-in-a-us 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…