SmsRetriever provides access to Google services that help you retrieve SMS
messages sent to your app without having to ask for android.permission.READ_SMS
or android.permission.RECEIVE_SMS.
To use SmsRetriever, obtain an instance of SmsRetrieverClient
using
getClient(Context) or
getClient(Activity), then start the SMS retriever service by calling
SmsRetrieverClient.startSmsRetriever() or
SmsRetrieverClient.startSmsUserConsent(String). The service waits for a matching
SMS message until timeout (5 minutes).
| String | EXTRA_CONSENT_INTENT | Intent extra key of the consent intent to be launched from client app. |
| String | EXTRA_SIM_SUBSCRIPTION_ID | [Optional] Intent extra key of the retrieved Sim
card subscription Id if any, as an int. |
| String | EXTRA_SMS_MESSAGE | Intent extra key of the retrieved SMS message as
a String. |
| String | EXTRA_STATUS | Intent extra key of Status,
which indicates SUCCESS or TIMEOUT. |
| String | SEND_PERMISSION | Permission that's used to register the receiver to detect that the broadcaster is the SMS Retriever. |
| String | SMS_RETRIEVED_ACTION | Intent action when SMS message is retrieved. |
| static SmsRetrieverClient | |
| static SmsRetrieverClient |
Intent extra key of the consent intent to be launched from client app.
[Optional] Intent extra key of the retrieved Sim card subscription Id if any, as an
int.
Intent extra key of the retrieved SMS message as a String.
Intent extra key of Status,
which indicates SUCCESS or TIMEOUT.
Permission that's used to register the receiver to detect that the broadcaster is the SMS Retriever.
Intent action when SMS message is retrieved.
Create a new instance of SmsRetrieverClient
for use in an Activity.
Create a new instance of SmsRetrieverClient
for use in a Context.