CredentialsData
Stay organized with collections
Save and categorize content based on your preferences.
Credentials data used to identify the credentials of the sender.
Inherited Constant Summary
From interface android.os.Parcelable
int |
CONTENTS_FILE_DESCRIPTOR |
|
int |
PARCELABLE_WRITE_RETURN_VALUE |
|
Public Method Summary
boolean |
|
String
|
getCredentials()
Returns the application-specific blob which identifies and possibly
authenticates the user that's requesting to launch or join an receiver app.
|
String
|
|
int |
|
void |
|
Inherited Method Summary
From class java.lang.Object
Object
|
clone()
|
boolean |
|
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()
|
From interface android.os.Parcelable
abstract int |
describeContents()
|
abstract void |
writeToParcel( Parcel arg0,
int arg1)
|
Constants
public static final String
CREDENTIALS_TYPE_ANDROID
The credentials type indicating it comes from an Android sender.
Constant Value: "android"
public static final String
CREDENTIALS_TYPE_CLOUD
The credentials type indicating it comes from the cloud (i.e. assistant).
Constant Value: "cloud"
public static final String
CREDENTIALS_TYPE_IOS
The credentials type indicating it comes from an iOS sender.
Constant Value: "ios"
public static final String
CREDENTIALS_TYPE_WEB
The credentials type indicating it comes from a Web sender.
Constant Value: "web"
Public Methods
public boolean equals (Object other)
public String 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 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 void writeToParcel (Parcel out, int
flags)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[null,null,["Last updated 2024-10-31 UTC."],[[["\u003cp\u003e\u003ccode\u003eCredentialsData\u003c/code\u003e stores sender credentials, including an application-specific blob and credentials type.\u003c/p\u003e\n"],["\u003cp\u003eIt supports various credential types like Android, Cloud, iOS, and Web, indicated by constants.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetCredentials()\u003c/code\u003e method retrieves the application-specific blob for user identification/authentication.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetCredentialsType()\u003c/code\u003e method reveals the type of credentials being used.\u003c/p\u003e\n"],["\u003cp\u003eIt implements \u003ccode\u003eParcelable\u003c/code\u003e for easy data transfer between components.\u003c/p\u003e\n"]]],[],null,["# CredentialsData\n\npublic class **CredentialsData** extends [Object](//developer.android.com/reference/java/lang/Object.html) \nimplements [Parcelable](//developer.android.com/reference/android/os/Parcelable.html) \nCredentials data used to identify the credentials of the sender. \n\n### Nested Class Summary\n\n|-------|---|---|------------------------------------------------------------------------------------------------|\n| class | [CredentialsData.Builder](/android/reference/com/google/android/gms/cast/CredentialsData.Builder) || Builder for [CredentialsData](/android/reference/com/google/android/gms/cast/CredentialsData). |\n\n### Constant Summary\n\n|-------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|\n| [String](//developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_ANDROID](/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_ANDROID) | The credentials type indicating it comes from an Android sender. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_CLOUD](/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_CLOUD) | The credentials type indicating it comes from the cloud (i.e. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_IOS](/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_IOS) | The credentials type indicating it comes from an iOS sender. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [CREDENTIALS_TYPE_WEB](/android/reference/com/google/android/gms/cast/CredentialsData#CREDENTIALS_TYPE_WEB) | The credentials type indicating it comes from a Web sender. |\n\n### Inherited Constant Summary\n\nFrom interface android.os.Parcelable \n\n|-----|-------------------------------|---|\n| int | CONTENTS_FILE_DESCRIPTOR | |\n| int | PARCELABLE_WRITE_RETURN_VALUE | |\n\n### Public Method Summary\n\n|-------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/android/reference/com/google/android/gms/cast/CredentialsData#equals(java.lang.Object))([Object](//developer.android.com/reference/java/lang/Object.html) other) |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getCredentials](/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. |\n| [String](//developer.android.com/reference/java/lang/String.html) | [getCredentialsType](/android/reference/com/google/android/gms/cast/CredentialsData#getCredentialsType())() Returns the type of the credentials. |\n| int | [hashCode](/android/reference/com/google/android/gms/cast/CredentialsData#hashCode())() |\n| void | [writeToParcel](/android/reference/com/google/android/gms/cast/CredentialsData#writeToParcel(android.os.Parcel,%20int))([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags) |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|----------------------------------------------------------------------------|--------------------------------------------------------------------------------|\n| [Object](//developer.android.com/reference/java/lang/Object.html) | clone() |\n| boolean | equals([Object](//developer.android.com/reference/java/lang/Object.html) arg0) |\n| void | finalize() |\n| final [Class](//developer.android.com/reference/java/lang/Class.html)\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| [String](//developer.android.com/reference/java/lang/String.html) | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nFrom interface android.os.Parcelable \n\n|---------------|--------------------------------------------------------------------------------------------------|\n| abstract int | describeContents() |\n| abstract void | writeToParcel([Parcel](//developer.android.com/reference/android/os/Parcel.html) arg0, int arg1) |\n\nConstants\n---------\n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**CREDENTIALS_TYPE_ANDROID**\n\nThe credentials type indicating it comes from an Android sender. \nConstant Value: \"android\" \n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**CREDENTIALS_TYPE_CLOUD**\n\nThe credentials type indicating it comes from the cloud (i.e. assistant). \nConstant Value: \"cloud\" \n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**CREDENTIALS_TYPE_IOS**\n\nThe credentials type indicating it comes from an iOS sender. \nConstant Value: \"ios\" \n\n#### public static final [String](//developer.android.com/reference/java/lang/String.html)\n**CREDENTIALS_TYPE_WEB**\n\nThe credentials type indicating it comes from a Web sender. \nConstant Value: \"web\"\n\nPublic Methods\n--------------\n\n#### public boolean **equals** ([Object](//developer.android.com/reference/java/lang/Object.html) other)\n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getCredentials** ()\n\nReturns the application-specific blob which identifies and possibly authenticates\nthe user that's requesting to launch or join an receiver app. This field may be\n`null`.\n\nFor requests sent from Assistant, it is an OAuth 2 token.\n\nFor requests sent from mobile senders, it is set by sender apps. \n\n#### public [String](//developer.android.com/reference/java/lang/String.html) **getCredentialsType** ()\n\nReturns the type of the credentials. This field may be `null`.\n\nThis could be one of the `CREDENTIALS_TYPE_*` constants or\ncustom-defined. \n\n#### public int **hashCode** ()\n\n#### public void **writeToParcel** ([Parcel](//developer.android.com/reference/android/os/Parcel.html) out, int flags)"]]