[ Web Proxy ]
URL:
Viewing: https://developer.android.com/reference/android/media/SuggestedDeviceInfo.Builder [Back]  [Original]

SuggestedDeviceInfo.Builder  |  API reference  |  Android Developers Skip to main content
Essentials Design & Plan Develop Google Play Blog
Search:
Android Studio
Android Developers [Android Developers]
Stay organized with collections Save and categorize content based on your preferences.

SuggestedDeviceInfo.Builder


public static final class SuggestedDeviceInfo.Builder
extends Object

java.lang.Object
   ↳ android.media.SuggestedDeviceInfo.Builder


Builder for SuggestedDeviceInfo.

Summary

Public constructors

Builder(String deviceDisplayName, String routeId, int type)

Constructor.

Public methods

SuggestedDeviceInfo build()

Creates a new SuggestedDeviceInfo.

SuggestedDeviceInfo.Builder setExtras(Bundle extras)

Sets the extras.

Inherited methods

Public constructors

Builder

Added in version 36.1
public Builder (String deviceDisplayName, 
                String routeId, 
                int type)

Constructor.

Parameters
deviceDisplayName String: The display name.
This value cannot be null.

routeId String: The route ID.
This value cannot be null.

type int: The route type.
Value is one of the following:

Public methods

build

Added in version 36.1
public SuggestedDeviceInfo build ()

Creates a new SuggestedDeviceInfo. The device display name, route ID, and type must be set. The extras cannot be null, but default to an empty Bundle.

Returns
SuggestedDeviceInfo

setExtras

Added in version 36.1
public SuggestedDeviceInfo.Builder setExtras (Bundle extras)

Sets the extras.

The default value is an empty Bundle.

Do not mutate the given Bundle after passing it to this method. You can use Bundle.deepCopy() to keep a mutable copy.

Parameters
extras Bundle: This value cannot be null.

Returns
SuggestedDeviceInfo.Builder This value cannot be null.

Throws
NullPointerException if the extras are null.

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 2026-08-03 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 2026-08-03 UTC."],[],[]]

Web Proxy Viewer  |  New URL  |  Original Page