Summary: Ctors | Methods | Inherited Methods | [Expand All]
public static class

# Credential.Builder

extends Object

java.lang.Object
↳ | com.google.android.gms.auth.api.credentials.Credential.Builder

## Summary

Public Constructors
| Credential.Builder(String id)
| Credential.Builder(Credential credential) Copies the information stored in an existing credential, in order to allow that information to be modified.

Public Methods
Credential | build()
Credential.Builder | setAccountType(String accountType) Specifies the account type for a federated credential.
Credential.Builder | setName(String name) Sets the display name for the credential, which should be easy for the user to recognize as associated to the credential, and distinguishable from other credentials they may have.
Credential.Builder | setPassword(String password) Sets the password for the credential.
Credential.Builder | setProfilePictureUri(Uri profilePictureUri) Sets a profile picture associated with the credential, typically a picture the user has selected to represent the account.

[Expand] Inherited Methods
From class java.lang.Object
Object | clone()
boolean | equals(Object arg0)
void | finalize()
final Class<?> | getClass()
int | hashCode()
final void | notify()
final void | notifyAll()
String | toString()
final void | wait(long arg0, int arg1)
final void | wait(long arg0)
final void | wait()

## Public Constructors

#### public Credential.Builder (String id)

#### public Credential.Builder (Credential credential)

Copies the information stored in an existing credential, in order to allow that information to be modified.

##### Parameters

credential | the existing credential

##### Returns

- a credential builder initialized with the data from the provided credential.

## Public Methods

#### public Credential build ()

#### public Credential.Builder setAccountType (String accountType)

Specifies the account type for a federated credential. The value should be set to identity provider's login domain, such as "https://accounts.google.com" for Google accounts. The login domains for common identity providers are listed in `IdentityProviders`.

##### Parameters

accountType | The type of the account. Typically, one of the values in `IdentityProviders`.

#### public Credential.Builder setName (String name)

Sets the display name for the credential, which should be easy for the user to recognize as associated to the credential, and distinguishable from other credentials they may have. This string will be displayed more prominently than, or instead of, the account ID whenever available. In most cases, the name of the user is sufficient.

#### public Credential.Builder setPassword (String password)

Sets the password for the credential. Either the password or the account type must be set for a credential, but not both.

#### public Credential.Builder setProfilePictureUri (Uri profilePictureUri)

Sets a profile picture associated with the credential, typically a picture the user has selected to represent the account.