I use these following lines of code to integrate with G + android embed.
In the build.gradle application:
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 also added the google-services.gson file at the application level. I also made a web application and used client-id for the requestIdToken () parameter.
requestIdToken (webapp client identifier).
After writing this code, still I get status code = 12501 in the response and tokenId = null.
I also read this link . But can not find any solution.
source share