When using the code from google's sms retriever api to first grab the device's phone number, the dialog is shown with a loading spinner, then quickly disappears. In onActivityResult, the resultCode is 1002 and the intent is empty. No documentation for this error code exists. The exact code I'm using is
email.setOnClickListener(v -> {
HintRequest hintRequest = new HintRequest.Builder().setHintPickerConfig(new CredentialPickerConfig.Builder().setPrompt(0).build())
.setPhoneNumberIdentifierSupported(true)
.setEmailAddressIdentifierSupported(false)
//.setAccountTypes(IdentityProviders.GOOGLE)
.build();
PendingIntent intent =
Auth.CredentialsApi.getHintPickerIntent(mGoogleApiClient, hintRequest);
try {
startIntentSenderForResult(intent.getIntentSender(),599,null,0,0,0,null);
} catch (IntentSender.SendIntentException e) {
Log.e("create", "Could not start hint picker Intent", e);
}
});
mGoogleApiClient = new GoogleApiClient.Builder(getContext())
.enableAutoManage(getActivity(),connectionResult -> {
Timber.e("conenction failed");
})
.addApi(Auth.CREDENTIALS_API)
.addApi(Auth.GOOGLE_SIGN_IN_API)
.build();
If I were to set as true EmailAddressIdentifiedSupported OR even just uncomment setAccountTypes, then the hint request would function correctly showing email accounts and returning the name and email to the app, but enabling both does not cause the credential id to be the phone number as in 1
This is being called from a fragment, but calling every variety of startIntentSenderForResult from any location makes no difference.