Added in API level 31
Builder
class Builder
kotlin.Any | |
↳ | android.media.metrics.NetworkEvent.Builder |
A builder for NetworkEvent
Summary
Public constructors | |
---|---|
Builder() Creates a new Builder. |
Public methods | |
---|---|
NetworkEvent |
build() Builds the instance. |
NetworkEvent.Builder |
setMetricsBundle(metricsBundle: Bundle) Sets metrics-related information that is not supported by dedicated methods. |
NetworkEvent.Builder |
setNetworkType(value: Int) Sets network type. |
NetworkEvent.Builder |
setTimeSinceCreatedMillis(value: Long) Sets timestamp since the creation in milliseconds. |
Public constructors
Public methods
build
Added in API level 31
fun build(): NetworkEvent
Builds the instance.
Return | |
---|---|
NetworkEvent |
This value cannot be null . |
setMetricsBundle
Added in API level 31
fun setMetricsBundle(metricsBundle: Bundle): NetworkEvent.Builder
Sets metrics-related information that is not supported by dedicated methods.
It is intended to be used for backwards compatibility by the metrics infrastructure.
Parameters | |
---|---|
metricsBundle |
Bundle: This value cannot be null . |
Return | |
---|---|
NetworkEvent.Builder |
This value cannot be null . |
setNetworkType
Added in API level 31
fun setNetworkType(value: Int): NetworkEvent.Builder
Sets network type.
Return | |
---|---|
NetworkEvent.Builder |
This value cannot be null . |
setTimeSinceCreatedMillis
Added in API level 31
fun setTimeSinceCreatedMillis(value: Long): NetworkEvent.Builder
Sets timestamp since the creation in milliseconds.
Parameters | |
---|---|
value |
Long: the timestamp since the creation in milliseconds. -1 indicates the value is unknown. Value is -1 or greater |
Return | |
---|---|
NetworkEvent.Builder |
This value cannot be null . |
See Also