# CredentialsData

public class **CredentialsData** extends [Object](https://developer.android.com/reference/java/lang/Object.html)  
implements [Parcelable](https://developer.android.com/reference/android/os/Parcelable.html) Credentials data used to identify the credentials of the sender.

### Nested Class Summary

|---|---|---|---|
| class | [CredentialsData.Builder](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData.Builder) || Builder for `https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData`. |

### Constant Summary

|---|---|---|
| [String](https://developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_ANDROID](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_ANDROID) | The credentials type indicating it comes from an Android sender. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_CLOUD](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_CLOUD) | The credentials type indicating it comes from the cloud (i.e. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_IOS](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_IOS) | The credentials type indicating it comes from an iOS sender. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_WEB](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_WEB) | The credentials type indicating it comes from a Web sender. |

### Inherited Constant Summary

From interface android.os.Parcelable

|---|---|---|
| int | CONTENTS_FILE_DESCRIPTOR |   |
| int | PARCELABLE_WRITE_RETURN_VALUE |   |

### Public Method Summary

|---|---|
| boolean | [equals](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#equals(java.lang.Object))([Object](https://developer.android.com/reference/java/lang/Object.html) other) |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getCredentials](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#getCredentials())() Returns the application-specific blob which identifies and possibly authenticates the user that's requesting to launch or join an receiver app. |
| [String](https://developer.android.com/reference/java/lang/String.html) | [getCredentialsType](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#getCredentialsType())() Returns the type of the credentials. |
| int | [hashCode](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#hashCode())() |
| void | [writeToParcel](https://developers.google.com/android/reference/com/google/android/gms/cast/CredentialsData#writeToParcel(android.os.Parcel,%20int))([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags) |

### Inherited Method Summary

From class java.lang.Object

|---|---|
| [Object](https://developer.android.com/reference/java/lang/Object.html) | clone() |
| boolean | equals([Object](https://developer.android.com/reference/java/lang/Object.html) arg0) |
| void | finalize() |
| final [Class](https://developer.android.com/reference/java/lang/Class.html)\<?\> | getClass() |
| int | hashCode() |
| final void | notify() |
| final void | notifyAll() |
| [String](https://developer.android.com/reference/java/lang/String.html) | toString() |
| final void | wait(long arg0, int arg1) |
| final void | wait(long arg0) |
| final void | wait() |

From interface android.os.Parcelable

|---|---|
| abstract int | describeContents() |
| abstract void | writeToParcel([Parcel](https://developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |

## Constants

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**CREDENTIALS_TYPE_ANDROID**

The credentials type indicating it comes from an Android sender.
Constant Value: "android"

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**CREDENTIALS_TYPE_CLOUD**

The credentials type indicating it comes from the cloud (i.e. assistant).
Constant Value: "cloud"

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**CREDENTIALS_TYPE_IOS**

The credentials type indicating it comes from an iOS sender.
Constant Value: "ios"

#### public static final [String](https://developer.android.com/reference/java/lang/String.html)
**CREDENTIALS_TYPE_WEB**

The credentials type indicating it comes from a Web sender.
Constant Value: "web"

## Public Methods

#### public boolean **equals** ([Object](https://developer.android.com/reference/java/lang/Object.html) other)

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getCredentials** ()

Returns the application-specific blob which identifies and possibly authenticates
the user that's requesting to launch or join an receiver app. This field may be
`null`.

For requests sent from Assistant, it is an OAuth 2 token.

For requests sent from mobile senders, it is set by sender apps.

#### public [String](https://developer.android.com/reference/java/lang/String.html) **getCredentialsType** ()

Returns the type of the credentials. This field may be `null`.

This could be one of the `CREDENTIALS_TYPE_*` constants or
custom-defined.

#### public int **hashCode** ()

#### public void **writeToParcel** ([Parcel](https://developer.android.com/reference/android/os/Parcel.html) out, int flags)