-1

I have used SMS retriever API to auto-read OTP which is working fine until last week. It stopped working suddenly when I have given latest update and also when we tested auto-read is working fine in original apk but not working in Playstore Derived Build.

I have generated 11 digit hash key using deployment_cert.der by following steps mentioned in below link.

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

Please help me how to fix it

2 Answers2

1

I have been trying this on my app very long time, finally I have done this.

  1. 1.Add this class in your project:- [https://github.com/arsalankhan994/AppSignatureHelper/tree/main]

2.Call this class in your Activity/Fragment

AppSignatureHelper appSignatureHelper = new 
AppSignatureHelper(this);
Log.v(TAG, appSignatureHelper.getAppSignatures().get(0));
Toast.make(this@ActivityName,appSignatureHelper.getAppSignatures().get(0),Toast.LENGTH_LONG).show()

3.Now generate your signed apk/bundle and upload this on your play console in internal testing. After that download build from internal testing run the app, then app show the toast with hashcode.

4.Add this code in your text message which have OTP.

Now your auto read otp will work.

Pawan kumar sharma
  • 654
  • 1
  • 7
  • 21
0

Finally I have resolved it by printing hash key from play-store apk using AppSignatureHelper class.

For Reference use below link

https://github.com/googlearchive/android-credentials/blob/master/sms-verification/android/app/src/main/java/com/google/samples/smartlock/sms_verify/AppSignatureHelper.java