Added in API level 30
Builder
class Builder
kotlin.Any | |
↳ | android.media.RouteDiscoveryPreference.Builder |
Builder for RouteDiscoveryPreference
.
Summary
Public constructors | |
---|---|
Builder(preferredFeatures: MutableList<String!>, activeScan: Boolean) |
|
Builder(preference: RouteDiscoveryPreference) |
Public methods | |
---|---|
RouteDiscoveryPreference |
build() Builds the |
RouteDiscoveryPreference.Builder |
setPreferredFeatures(preferredFeatures: MutableList<String!>) Sets preferred route features to discover. |
RouteDiscoveryPreference.Builder |
setShouldPerformActiveScan(activeScan: Boolean) Sets if active scanning should be performed. |
Public constructors
Builder
Added in API level 30
Builder(
preferredFeatures: MutableList<String!>,
activeScan: Boolean)
Parameters | |
---|---|
preferredFeatures |
MutableList<String!>: This value cannot be null . |
Builder
Added in API level 30
Builder(preference: RouteDiscoveryPreference)
Parameters | |
---|---|
preference |
RouteDiscoveryPreference: This value cannot be null . |
Public methods
build
Added in API level 30
fun build(): RouteDiscoveryPreference
Builds the RouteDiscoveryPreference
.
Return | |
---|---|
RouteDiscoveryPreference |
This value cannot be null . |
setPreferredFeatures
Added in API level 30
fun setPreferredFeatures(preferredFeatures: MutableList<String!>): RouteDiscoveryPreference.Builder
Sets preferred route features to discover.
Parameters | |
---|---|
preferredFeatures |
MutableList<String!>: features of routes that media router would like to discover. May include predefined features such as MediaRoute2Info#FEATURE_LIVE_AUDIO , MediaRoute2Info#FEATURE_LIVE_VIDEO , or MediaRoute2Info#FEATURE_REMOTE_PLAYBACK or custom features defined by a provider. This value cannot be null . |
Return | |
---|---|
RouteDiscoveryPreference.Builder |
This value cannot be null . |
setShouldPerformActiveScan
Added in API level 30
fun setShouldPerformActiveScan(activeScan: Boolean): RouteDiscoveryPreference.Builder
Sets if active scanning should be performed.
Since active scanning uses more system resources, set this as true
only when it's necessary.
Return | |
---|---|
RouteDiscoveryPreference.Builder |
This value cannot be null . |