Authenticating Your Client
Certain Google Play services (such as Google Sign-in and App Invites) require you to provide the SHA-1 of your signing certificate so we can create an OAuth2 client and API key for your app. To get your SHA-1, follow these instructions:
Open a terminal and run thekeytoolutility provided with Java to get the SHA-1 fingerprint of thecertificate. You should get both the release and debug certificate fingerprints.
To get the release certificate fingerprint:
keytool-exportcert-list-v \
-alias your-key-name -keystore path-to-production-keystore
To get the debug certificate fingerprint:
keytool -exportcert -list -v \
-alias androiddebugkey -keystore ~/.android/debug.keystore
The keytool utility prompts you to enter a password for the keystore. The default password for thedebug keystore isandroid. The keytool then prints the fingerprint to the terminal. For example:
Certificatefingerprint:SHA1:DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
To learn more , see https://developers.google.com/android/guides/client-auth
网友评论