I generated Hash from AppSignatureHelper class which works for debug build, same didn't work for release build, so I generated a hash using keystore and alias using command https://developers.google.com/identity/sms-retriever/verify#computing_your_apps_hash_string and updated to SMS text, this too didn't work.
问题:
回答1:
First publish app on play store then do these steps :
- Go to Release management in developer console.
- Click on App signing.
I have added an example you can check in below SS.
EDIT 1:-
Steps for Release Hashkey:
- Download Openssl (Download from here), I have downloaded for 64 bit OS, you can find more here
- Extract downloaded zip file to C:\ drive only
- Open command prompt
keytool -exportcert -alias **myaliasname** -keystore **"C:\Users\hiren.patel\Desktop\mykeystore.jks"** | "C:\openssl-0.9.8e_X64\bin\openssl.exe" sha1 -binary | "C:\openssl-0.9.8e_X64\bin\openssl.exe" base64
Kindly change Alias Name and Keystore with it's path as your requirement.
Note:
Please put your details where I have marked between ** **.Terminal would ask for Password of Keystore. You have to provide password for the same Keystore.
So finally you would get the Release Hashkey.
Done
EDIT 2:
Use this command in linux :
echo 33:4E:48:84:19:50:3A:1F:63:A6:0F:F6:A1:C2:31:E5:01:38:55:2E | xxd -r -p | openssl base64
if you don't have linux OS then you can do this online : using this link :
https://rextester.com/l/bash_online_compiler
Note : USE API SIGNING KEY FROM DEVELOPER CONSOLE.
Edit 3:
Try generating hash without alias for Google APK Sign Enabled
i.e
keytool -exportcert -keystore MyProductionKeys.keystore | xxd -p | tr -d "[:space:]" | echo -n com.example.myapp `cat` | sha256sum | tr -d "[:space:]-" | xxd -r -p | base64 | cut -c1-11
NOTE : SHA-256 certificate fingerprint, take this from developer console
回答2:
Finally this solved my problem How to generate 11 char hash key for Sms Retriever with Google App signing
The solution mentioned by @farhan in his question helped