Reference
Google SMS retriever
AVD Emulator (with GooglePlay Store)
-
Run this demo
-
Click 'Test' to pickup a phone number
(you can send the phone number to your server, then server sends SMS to the specific phone number)
- See Android Studio Debug console, copy the hash code, paste it in next step. This hash code simulates server generated the one-time code. (thanks AppSignatureHelper.java, remove it before you publish your app)
- Open emulator settings->phone->send message.
SMS message format:
<#> Your ExampleApp code is: 123ABC78 bMWGb1odbbw
- SMS send to emulator, the smsRetrieverAPI verify SMS. Here's only two status you can get, success or timeout. if verify result is fail, nothing happened.