title: HASH string key on published APK in SMS Retriever API
body: <p>A lot of these questions were asked. but none worked for me. </p>
  
  <p><strong>Question:</strong></p>
  
  <p>I was able to get the correct key using <a href="https://github.com/googlearchive/android-credentials/blob/master/sms-verification/android/app/src/main/java/com/google/samples/smartlock/sms_verify/AppSignatureHelper.java" rel="nofollow noreferrer">AppSignatureHelper.java</a> 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 <a href="https://stackoverflow.com/a/55829661/6465824">this</a>. and below code using keystore:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>None of them working in the published app. SMS simply not reading!! Any help would be appreciated.</p>