I am trying to implement sms retriever api to read OTP code message without having to add read_sms permission.
The help doc here, ask user to generate hash code specific to app.
I have generated the code as required but still
<action android:name="com.google.android.gms.auth.api.phone.SMS_RETRIEVED"/>
broadcast receiver is not firing up.
How can I debug this?
I am testing this by sending a SMS from one mobile to another and I am following the SMS requirement as specified in the document above.
Also, There are various methods mentioned to generated hash code. I have tried them all. Problem is each method generated different hash.
I have tried for both debug and release keystore.
Here are those various methods:
About. Hash App lets US retail investors invest both in the US markets, and globally, especially in emerging markets - Investing Without Borders!
The first linux command specifies the alias name as MyAndroidKey
but yours might be different. You can find out your alias name by
keytool -list -rfc -keystore $KEYSTORE
where $KEYSTORE
is your keystore file.
With the alias name, you can try using the following two commands to verify if the results are the same:
keytool -alias MyAndroidKey -exportcert -keystore $KEYSTORE | xxd -p
keytool -list -rfc -keystore $KEYSTORE | sed -e '1,/BEGIN/d' | sed -e '/END/,$d' | tr -d ' \n' | base64 --decode | xxd -p
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With