A lot of these questions were asked. but none worked for me.
Question:
I was able to get the correct key using AppSignatureHelper.java in debug mode and all working as expected. And I've published my app on play store and used the same class on signed apk to retrieve HASH key but it's not working. I tried all other ways mentioned in a lot previous questions like this. and below code using keystore:
keytool -exportcert -alias PlayDeploymentCert -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
None of them working in the published app. SMS simply not reading!! Any help would be appreciated.