1

I worked on sms retriever API and it worked successfully on debug mode but not in signed build and playstore app the sms retriever api was not picking up the code automatically. I tried different techniques to generate the 11 digit code for playstore but it didn't worked. I even downloaded my app signing certificate from Google Play COnsole and generated 11 digit code from that .der certififcate convert it to .jks file and got hash key from it but it did not worked as well.

i have tried the solution provided by this link.

How to generate 11 char hash key for Sms Retriever with Google App signing

  • Have you tried using **getAppSignatures** method from [there](https://github.com/googlesamples/android-credentials/blob/master/sms-verification/android/app/src/main/java/com/google/samples/smartlock/sms_verify/AppSignatureHelper.java)? – Yevhenii Apr 25 '19 at 19:21
  • yes,it worked in debug mode only. – Muhammad Ahmad Apr 26 '19 at 09:22
  • yes finally solved this problem. what i was doing, i was executing command "keytool -exportcert -keystore MyProductionKeys.keystore | xxd -p" on windows command line i got some realy long code value and use it in signatureHelper class to generate application signature that was not correct. – Muhammad Ahmad Apr 29 '19 at 06:27
  • iam also having same problem, how to solve this. – Navin Kumar May 23 '19 at 11:45
  • follow the verified answer of below link and use gitbash command line to run the given commands. https://stackoverflow.com/questions/51365778/how-to-generate-11-char-hash-key-for-sms-retriever-with-google-app-signing – Muhammad Ahmad Jun 13 '19 at 06:28

1 Answers1

1

I know I replied very late. But I got the solution for this.

First follow the steps given in below link: How to generate 11 char hash key for Sms Retriever with Google App signing

If this not work, try following alternate solution, it worked for me in various apps:

provide the play store generated hash to backend. For generating hash key on playstore, i have used AppSignatureHelper class and make Toast for the generated hash key and upload this build on play store. After successfully rollout, i have download the build. Now Toast will show with the playstore generated hash key, provide this key to backend. It is working fine for me.

Ashish Agrawal
  • 657
  • 7
  • 12
  • can I use upload keystore signing instead of Dev/Stage testing or it has to be Google Play Signing and app uploaded from Google Play 100%? – user924 Nov 19 '21 at 09:19