I am using these below lines of code for G+ sign-in android integration.
In app build.gradle :
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-plus:8.4.0'
In MainActivity :
GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestEmail()
.requestIdToken("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.com")
.requestProfile()
.build();
AppCompatActivity appCompatActivity = (AppCompatActivity) context;
googleApiClient = new GoogleApiClient.Builder(context)
.enableAutoManage(appCompatActivity, this)
.addConnectionCallbacks(this)
.addApi(Auth.GOOGLE_SIGN_IN_API, gso)
.addApi(Plus.API)
.build();
I have also added "google-services.gson" file at app level. I have also made web-application and use client-id for requestIdToken() parameter.
requestIdToken(client-id of webapp).
After writing this code, Still I am getting status code = 12501 in response and tokenId = null.
I have also read this link. But Can not find any solution.