1

I am trying to enable google signin in my android app following this tutorial.. But GoogleSignInResult#isSuccess() always return false. The value of result.getStatus().getStatusCode(); is 0 which was success accoding to GoogleAPI's CommonStatusCode

I researched a bit and found similar issues. I have tried

  1. Generating a google-services.json from SHA key from my application and pasting it in my app folder.

  2. Also by generating signed apk and seprately(not running from android studio) installing it in my phone

But none of them works for me.

Any help would be appreciated

Community
  • 1
  • 1
singhakash
  • 7,891
  • 6
  • 31
  • 65
  • Your tutorial is quite old. Now, Google changed to use Firebase. You can use try this https://firebase.google.com/docs/auth/android/google-signin – RoShan Shan Apr 01 '17 at 16:16
  • @RoShanShan No Luck http://stackoverflow.com/questions/43168573/projects-created-at-console-firebase-google-com-must-use-the-new-firebase-authen – singhakash Apr 02 '17 at 12:54
  • Follow below tutorial to implement google sign-in in your android app. It is recent article and has all steps to do that. http://www.zoftino.com/google-sign-in-option-in-android-apps – Arnav Rao Apr 03 '17 at 04:40
  • You can have a look at [this answer.](https://stackoverflow.com/a/56340297/2289835) – Rumit Patel May 28 '19 at 10:40

1 Answers1

0

I have faced this same exact problem. This occurs when you do not provide the SHA-1 app code when you download the google-services.json.

  1. Go to console.firebase.com and create another android app in your project.
  2. Fill in ALL the fields including the SHA-1 code.
  3. Download the google-services.json
  4. Put the google-services.json in the App directory root.