Search in sources :

Example 1 with HintRequest

use of com.google.android.gms.auth.api.credentials.HintRequest in project FirebaseUI-Android by firebase.

the class CheckEmailFragment method getEmailHintIntent.

private PendingIntent getEmailHintIntent() {
    GoogleApiClient client = new GoogleApiClient.Builder(getContext()).addApi(Auth.CREDENTIALS_API).enableAutoManage(getActivity(), GoogleApiHelper.getSafeAutoManageId(), new GoogleApiClient.OnConnectionFailedListener() {

        @Override
        public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {
            Log.e(TAG, "Client connection failed: " + connectionResult.getErrorMessage());
        }
    }).build();
    HintRequest hintRequest = new HintRequest.Builder().setHintPickerConfig(new CredentialPickerConfig.Builder().setShowCancelButton(true).build()).setEmailAddressIdentifierSupported(true).build();
    return Auth.CredentialsApi.getHintPickerIntent(client, hintRequest);
}
Also used : GoogleApiClient(com.google.android.gms.common.api.GoogleApiClient) HintRequest(com.google.android.gms.auth.api.credentials.HintRequest) NonNull(android.support.annotation.NonNull) ConnectionResult(com.google.android.gms.common.ConnectionResult) CredentialPickerConfig(com.google.android.gms.auth.api.credentials.CredentialPickerConfig)

Aggregations

NonNull (android.support.annotation.NonNull)1 CredentialPickerConfig (com.google.android.gms.auth.api.credentials.CredentialPickerConfig)1 HintRequest (com.google.android.gms.auth.api.credentials.HintRequest)1 ConnectionResult (com.google.android.gms.common.ConnectionResult)1 GoogleApiClient (com.google.android.gms.common.api.GoogleApiClient)1