5

Recently we decided to start using SMS Retriever API to read OTP. I followed all steps and it's working correctly.

The problem is BroadcastReceiver is getting callback after a long delay. SMS notification is pushed by system as soon as SMS is actually received. But, receiver will get it after almost a minute.

Tested on Samsung J3 emerge. Android 6.0.1, PlayServices 14.5.81.

Did anyone faced this issue? Is there receiver priority issue or any other limitation of the API?

HBB20
  • 2,743
  • 1
  • 24
  • 35
  • Hey, have you got the solution? I am facing the same issue. – Akash Wankhede Dec 18 '18 at 06:54
  • Not really a solution but after a while (after few more tests) it started working and no one is complaining. Just a quick question, is the latest PlayServices installed on your device? – HBB20 Dec 18 '18 at 14:02
  • Yes. latest playservices installed on device. – Akash Wankhede Dec 18 '18 at 14:03
  • 1
    btw, now Its working for me also. We have changed the hash string generation strategy. we generate hash string at client side. Its woks like charm now. – Akash Wankhede Dec 18 '18 at 14:04
  • yes. latest playservices installed on device. – Akash Wankhede Dec 18 '18 at 14:05
  • Try few more times and see if it works. I was usually killing the app and testing on signup page that's where I faced issue. First time I noticed it quick was on change phone number page (when app was already running for more than a minute). And magically it started working after that.. – HBB20 Dec 18 '18 at 14:07
  • Oh I just noticed your last message. Congratulations :thumb_up: – HBB20 Dec 18 '18 at 14:08
  • @HBB20 I'm trying to read OTP only but its only re-truing TimeOut.. – Atif AbbAsi Dec 19 '18 at 10:22
  • Are you sure that you are using correct format and hash in SMS? Hash depends on the signing key. While debugging it uses debug signing key (unless you changed) so it's hash will be different from your release build's hash. – HBB20 Dec 23 '18 at 06:09
  • @AkashWankhede what do you mean "we generate hash string at client side" – Maxim Toyberman Dec 27 '18 at 15:42
  • @Maxim Toyberman It can be generated both at server and at client side. It is easier to generate at client side. – taranjeetsapra Jan 08 '19 at 09:06

0 Answers0