0

I have just started implementing Google Sign In API, this is my configuration:

I added this to gradle:

compile 'com.google.android.gms:play-services:10.2.6'

This is my OnCreate:

gso=new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_GAMES_SIGN_IN)
            .requestEmail()
            .build();

    googleApiClient=new GoogleApiClient.Builder(this)
            .enableAutoManage(this,this)
            .addApi(Auth.GOOGLE_SIGN_IN_API,gso)
            .build();

This is how I invoke the sign-in process:

  Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);
    startActivityForResult(signInIntent, GOOGLE_SIGNIN_ID);

But it doesn't work and it says Google Play Services has stopped working, in the logs it says "INTERNAL ERROR"

I have linked my app to a service, I have the OAUTH2 code, I don't know what I'm doing wrong and am pretty much desperate, thanks for your help.

Matthew
  • 105
  • 1
  • 11
  • You may want to check [Troubleshooting Issues in Your Android Game](https://developers.google.com/games/services/android/troubleshooting). Checking your package name and certificate fingerprint as suggested in this [related SO post](https://stackoverflow.com/questions/34942692/occured-an-internal-error-when-requestemail-from-googlesigninoptions-android) might also help. – Teyam May 25 '17 at 11:14
  • I've actually managed to make it work, I think the .json configuration file was not working, thank you for your time anyway – Matthew May 26 '17 at 16:57

1 Answers1

0

Add configuration file with SHA-1 hash of your signing certificate.

Configuration file to your project

add google-services.json in app directory of your Android Studio project

sasikumar
  • 12,540
  • 3
  • 28
  • 48
  • I followed the link and it redirected me to Firebase, I got the json from there, and copied it to my app folder, still does not work. – Matthew May 24 '17 at 17:35