# PlayServicesDevicePerformance

# PlayServicesDevicePerformance

Artifact:[androidx.core:core-performance-play-services](https://developer.android.com/jetpack/androidx/releases/core)  
[View Source](https://cs.android.com/search?q=file:androidx/core/performance/play/services/PlayServicesDevicePerformance.kt+class:androidx.core.performance.play.services.PlayServicesDevicePerformance)  
Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/core/performance/play/services/PlayServicesDevicePerformance "View this page in Java")

<br />

```
class PlayServicesDevicePerformance : DevicePerformance
```

<br />

*** ** * ** ***

A DevicePerformance that uses Google Play Services to retrieve media performance class data.

## Summary

|                                                                                                                                                                                         ### Public constructors                                                                                                                                                                                         |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PlayServicesDevicePerformance](https://developer.android.com/reference/kotlin/androidx/core/performance/play/services/PlayServicesDevicePerformance#PlayServicesDevicePerformance(android.content.Context))`(context: `[Context](https://developer.android.com/reference/android/content/Context.html)`)` A DevicePerformance that uses Google Play Services to retrieve media performance class data. |

|                               ### Public properties                                |
|------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `open `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html) | [mediaPerformanceClass](https://developer.android.com/reference/kotlin/androidx/core/performance/play/services/PlayServicesDevicePerformance#mediaPerformanceClass()) The media performance class of the device or 0 if none. |

## Public constructors

### PlayServicesDevicePerformance

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)  

```
PlayServicesDevicePerformance(context: Context)
```

A DevicePerformance that uses Google Play Services to retrieve media performance class data.  

|                                         Parameters                                         |
|--------------------------------------------------------------------------------------------|---------------------------------------|
| `context: `[Context](https://developer.android.com/reference/android/content/Context.html) | The application context value to use. |

## Public properties

### mediaPerformanceClass

Added in[1.0.0](https://developer.android.com/jetpack/androidx/releases/core#1.0.0)  

```
open val mediaPerformanceClass: 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. This value is stable for the duration of the process.

Possible non-zero values are defined in[Build.VERSION_CODES](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html)starting with[VERSION_CODES.R](https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#R()).

Defaults to[VERSION.MEDIA_PERFORMANCE_CLASS](https://developer.android.com/reference/android/os/Build.VERSION.html#MEDIA_PERFORMANCE_CLASS())