[]()// Construct a request for phone numbers and show the picker
private void requestHint() {
HintRequest hintRequest = new HintRequest.
[]()// Get an instance of SmsRetrieverClient, used to start listening for a matching
// SMS message.
SmsRetrieverClient client = SmsRetriever.getClient(this / context /);
[]()/* BroadcastReceiver to wait for SMS messages. This can be registered either
in the AndroidManifest or at runtime. Should filter Intents on
SmsRetriever.SMS_RETRIEVED_ACTION.
*/
public class MySMSBroadcastReceiver extends BroadcastReceiver {
[]()// On the next install, retrieve the phone number
mCredentialRequest = new CredentialRequest.Builder()
.setAccountTypes("https://signin.example.com") // the URL specific to the developer
android-support@fb.com
[]()buildscript { repositories { google() mavenCentral() } }
[]()dependencies { implementation 'com.google.android.gms:play-services-auth:20.7.0' implementation 'com.google.android.gms:play-services-auth-api-phone:18.0.1' }
[]()// Construct a request for phone numbers and show the picker private void requestHint() { HintRequest hintRequest = new HintRequest.
[]()// Get an instance of SmsRetrieverClient, used to start listening for a matching // SMS message. SmsRetrieverClient client = SmsRetriever.getClient(this / context /);
[]()/* BroadcastReceiver to wait for SMS messages. This can be registered either in the AndroidManifest or at runtime. Should filter Intents on SmsRetriever.SMS_RETRIEVED_ACTION. */ public class MySMSBroadcastReceiver extends BroadcastReceiver {
[]()<receiver android:name=".MySMSBroadcastReceiver" android:exported="true" android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
android:permission="com.google.android.gms.auth.api.phone.permission.SEND">
Credential credential = new Credential.Builder(phoneNumberString)
.setAccountType("https://signin.example.com")
[]()// On the next install, retrieve the phone number mCredentialRequest = new CredentialRequest.Builder() .setAccountTypes("https://signin.example.com") // the URL specific to the developer