Stay organized with collections
Save and categorize content based on your preferences.
SuggestedDeviceInfo
class SuggestedDeviceInfo : Parcelable
Allows applications to suggest routes to the system UI (for example, in the System UI Output Switcher).
Suggested devices are used to transfer the current media session from one device to another.
Summary
Inherited constants |
From class Parcelable
Int |
CONTENTS_FILE_DESCRIPTOR
Descriptor bit used with describeContents() : indicates that the Parcelable object's flattened representation includes a file descriptor.
|
Int |
PARCELABLE_WRITE_RETURN_VALUE
Flag for use with writeToParcel : the object being written is a return value, that is the result of a function such as "Parcelable someFunction() ", "void someFunction(out Parcelable) ", or "void someFunction(inout Parcelable) ". Some implementations may want to release resources at this point.
|
|
Public methods |
Int |
|
Boolean |
|
String |
Returns the name to be displayed to the user.
|
Bundle |
Returns the extras associated with the suggestion.
|
String |
Returns the route ID associated with the suggestion.
|
Int |
Returns the device type associated with the suggestion.
|
Int |
|
String |
|
Unit |
Flatten this object in to a Parcel.
|
Public methods
describeContents
fun describeContents(): Int
equals
fun equals(other: Any?): Boolean
Parameters |
obj |
the reference object with which to compare. |
Return |
Boolean |
true if this object is the same as the obj argument; false otherwise. |
getDeviceDisplayName
fun getDeviceDisplayName(): String
Returns the name to be displayed to the user.
Return |
String |
The device display name. This value cannot be null . |
fun getExtras(): Bundle
Returns the extras associated with the suggestion.
Return |
Bundle |
The extras. This value cannot be null . |
getRouteId
fun getRouteId(): String
Returns the route ID associated with the suggestion.
Return |
String |
The route ID. This value cannot be null . |
getType
fun getType(): Int
Returns the device type associated with the suggestion.
Return |
Int |
The device type. Value is android.media.MediaRoute2Info#TYPE_UNKNOWN , android.media.MediaRoute2Info#TYPE_BUILTIN_SPEAKER , android.media.MediaRoute2Info#TYPE_WIRED_HEADSET , android.media.MediaRoute2Info#TYPE_WIRED_HEADPHONES , android.media.MediaRoute2Info#TYPE_BLUETOOTH_A2DP , android.media.MediaRoute2Info#TYPE_HDMI , android.media.MediaRoute2Info#TYPE_HDMI_ARC , android.media.MediaRoute2Info#TYPE_HDMI_EARC , android.media.MediaRoute2Info#TYPE_LINE_DIGITAL , android.media.MediaRoute2Info#TYPE_LINE_ANALOG , android.media.MediaRoute2Info#TYPE_AUX_LINE , android.media.MediaRoute2Info#TYPE_USB_DEVICE , android.media.MediaRoute2Info#TYPE_USB_ACCESSORY , android.media.MediaRoute2Info#TYPE_DOCK , android.media.MediaRoute2Info#TYPE_USB_HEADSET , android.media.MediaRoute2Info#TYPE_HEARING_AID , android.media.MediaRoute2Info#TYPE_BLE_HEADSET , android.media.MediaRoute2Info#TYPE_REMOTE_TV , android.media.MediaRoute2Info#TYPE_REMOTE_SPEAKER , android.media.MediaRoute2Info#TYPE_REMOTE_AUDIO_VIDEO_RECEIVER , android.media.MediaRoute2Info#TYPE_REMOTE_TABLET , android.media.MediaRoute2Info#TYPE_REMOTE_TABLET_DOCKED , android.media.MediaRoute2Info#TYPE_REMOTE_COMPUTER , android.media.MediaRoute2Info#TYPE_REMOTE_GAME_CONSOLE , android.media.MediaRoute2Info#TYPE_REMOTE_CAR , android.media.MediaRoute2Info#TYPE_REMOTE_SMARTWATCH , android.media.MediaRoute2Info#TYPE_REMOTE_SMARTPHONE , or android.media.MediaRoute2Info#TYPE_GROUP |
hashCode
fun hashCode(): Int
Return |
Int |
a hash code value for this object. |
toString
fun toString(): String
Return |
String |
a string representation of the object. |
writeToParcel
fun writeToParcel(
dest: Parcel,
flags: Int
): Unit
Flatten this object in to a Parcel.
Properties
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-08-20 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-20 UTC."],[],[]]