Please can you help me with this issue, the case is that I am adding push notifications firebase
to my android project, I understand that the digital footprint SHA-1
, if the application is going to be uploaded to google play store
, the production certificate must be added, which I have done is to obtain the SHA-1
test as shown in the illustration image, for example,
How do I get the production certificate?
thank you very much for your help.
Remember that for development the keystore : is regularly used by default
debug.keystore
, which is located in the path:or specifically the path on windows:
path on macOS
This is the keystore that we use for development, but when you upload an application to Google PlayStore it is necessary to sign it with a production keystore which you must create and you must not lose it , this Keystore is the one with which the SHA-1 for development would be obtained.
You are currently using the development keystore:
to obtain the production SHA1 you must use use the Keystore that you generated for production , for example assuming it is located in c:\android\keystore\Ivan.Keystore you would obtain it in this way, specifying the respective alias and passwords:
this will show you a different SHA-1 than the one obtained through the development keystore.
Get the SHA-1 of the debug Keystore from Android Studio
Another way to get the SHA-1 of the debug Keystore from Android Studio is done from the gradle option, in the upper right corner:
Select the project, go to
Tasks
>android
>signingReport
clicking on it will show in the console theSHA-1
:Get SHA1 in Android Studio using terminal.
Another option to obtain the SHA1 of the development certificate is through the Terminal, we write:
I just did this for Branch.io and Firebase. This is exactly what my MD5, SHA1 and SHA256 gave me:
If you're on Windows, go to the folder where your keystore is. Hold down the shift key and then right click. You should see "Open command prompt here" in the list of options.
When the command prompt opens, type the following and you'll get everything you need:
Then it will ask for the password. Enter your password and press enter. Then you will have all your necessary information.
SIDE NOTE
If you want to save the information for future use, right-click it and choose select all. Hit enter and then paste your favorite text editor. Save it in your keystore so you always have the reference in case you need it for other sdk's / api's. I hope that helps.
If it's on Windows
Hold down the Windows start key and press "X". Select "System" Then select "Advanced system settings" on the left side. In the popup window, click environment variables. In the System Variables section, look for "JAVA HOME" if it's not there, click new. Type JAVA_HOME for the variable name. Enter the following for the variable value:
Make sure it matches the JDK version you have
Then find the variable "Path" and add:
Make sure they match the locations of your Java SDK and Runtime environments. You will then be able to access keytool from anywhere via command prompt.