Your code for initiating the SmsRetrieverClient is fine. The problem lies with the physical device's state or hardware.
Check Your Physical Deviceļ¼
- Is there an active SIM card? The device must have a valid, active SIM card installed. A phone without a SIM cannot receive SMS messages.
- Is it a Wi-Fi-only tablet? If the device is a tablet without cellular capabilities, it cannot receive SMS messages and this API will fail.
- Is Airplane Mode off? Ensure the device is not in Airplane Mode, or if it is, that cellular services are explicitly enabled.
- Can it receive a regular SMS? As a final check, try sending a normal text message to the device from another phone. If it doesn't arrive, you've confirmed the core issue. The
SmsRetriever API won't work if the device can't receive standard text messages.