SMS Retriver API无法在Playstore派生版本上工作



我已经使用SMS检索器API来自动读取OTP,直到上周,OTP一直运行良好。当我给出最新更新时,它突然停止工作,当我们测试自动读取时,它在原始apk中运行良好,但在Playstore Derived Build中不工作。

我已经使用deployment_cert.der通过以下链接中提到的步骤生成了11位散列密钥。

如何使用谷歌应用程序签名为Sms Retriever生成11个字符的哈希密钥

请帮助我如何修复

我已经在我的应用程序上尝试了很长时间,终于做到了。

  1. 1.在项目中添加此类:-[https://github.com/arsalankhan994/AppSignatureHelper/tree/main]

2.在活动/片段中调用此类

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.现在生成您的签名apk/bundle,并在内部测试中将其上传到您的游戏控制台上。在内部测试下载构建后运行应用程序,然后应用程序显示带有哈希代码的toast。

4.将此代码添加到具有OTP的短信中。

现在你的自动读取otp将工作。

最后,我通过使用AppSignatureHelper类从播放商店apk打印哈希密钥来解决这个问题。

供参考使用,链接

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

最新更新