Created
February 18, 2020 07:55
-
-
Save nowshad-hasan/37ecf82351960d1e2802a83eb9e9ab9e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Construct a request for phone numbers and show the picker | |
private void requestHint() { | |
HintRequest hintRequest = new HintRequest.Builder() | |
.setPhoneNumberIdentifierSupported(true) | |
.build(); | |
GoogleApiClient apiClient= new GoogleApiClient.Builder(this) | |
.addConnectionCallbacks(this) // implement the callbacks | |
.enableAutoManage(this, this) | |
.addApi(Auth.CREDENTIALS_API) | |
.build(); | |
PendingIntent intent = Auth.CredentialsApi.getHintPickerIntent( | |
apiClient, hintRequest); | |
startIntentSenderForResult(intent.getIntentSender(), | |
RESOLVE_HINT, null, 0, 0, 0); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment