Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - google-services.json for debug and release mode

I created an Android project on Google dev console using debug SHA1 fingerprint and also generated google-services.json file using same debug SHA1 fingerprint for by Google oauth2 implementation. Everything works fine. To upload the app to Google Play, I created one more project on Google dev console with release keystore SHA1 fingerprint and did not generate google-service.json. However, app is working fine even in release mode and I am able to do Google login in my app.

So what exactly is the use of google-services.json file? Should I create a new google-service.json file for release mode and how is it working even without it? That file has client_id of Android project that I created with debug SHA1 fingerprint.

I have checked both these links - link1 and link2 but did not find any answers satisfying. Thanks.

like image 899
androidGuy Avatar asked Sep 01 '26 19:09

androidGuy


1 Answers

You do not need another json file for the same project. Google has simplified some manual steps by giving json file. You Google Cloud Project ID is the only thing required at the client side. Google Play Services will check with their server at the time of auth. and if there's a clientId created on the said Cloud project with SHA1 of the app requesting the auth, then it will work.

like image 60
sandeepd Avatar answered Sep 03 '26 08:09

sandeepd