See what premium Google Developer Program benefits can do for you. Learn more
Stay organized with collections
Save and categorize content based on your preferences.
@DoNotMock("Use canonical fakes instead.") interface DevicePerformanceClient : HasApiKey<NoOptions>
Client interface for the Device Performance API.
Summary
Public methods
|
abstract Task<Int> |
The media performance class of the device or 0 if none.
|
Public methods
@RequiresGmsVersion(2147483647) abstract fun mediaPerformanceClass(): Task<Int>
The media performance class of the device or 0 if none.
If this value is not 0
, the device conforms to the media performance class definition of the
SDK version of this value.
Possible non-zero values are defined in android.os.Build.VERSION_CODES
starting with
android.os.Build.VERSION_CODES.R
.
Defaults to android.os.Build.VERSION.MEDIA_PERFORMANCE_CLASS
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.
[[["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 2024-10-31 UTC."],[[["`DevicePerformanceClient` provides access to device performance information, particularly its media capabilities."],["The primary function, `mediaPerformanceClass()`, returns the device's media performance class as an integer, indicating its adherence to specific performance standards."],["A non-zero value from `mediaPerformanceClass()` signifies the device's conformity to a defined media performance class, aligning with its SDK version."],["These performance classes are detailed in `android.os.Build.VERSION_CODES`, offering insights into the device's media handling capabilities."]]],["The `DevicePerformanceClient` interface, part of the Device Performance API, provides a method called `mediaPerformanceClass`. This method returns a `Task\u003cInt\u003e` representing the device's media performance class. If the value returned is `0`, it means there is no defined media performance class. Non-zero values indicate conformance to the media performance class definition of the SDK version, aligning with `android.os.Build.VERSION_CODES` starting from `R`.\n"]]