# 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)

*** ** * ** ***


```
public final class PlayServicesDevicePerformance implements DevicePerformance
```

<br />

*** ** * ** ***

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

## Summary

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

| ### Public methods |
|---|---|
| `int` | `https://developer.android.com/reference/androidx/core/performance/play/services/PlayServicesDevicePerformance#getMediaPerformanceClass()()` 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)

```
public PlayServicesDevicePerformance(@NonNull Context context)
```

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

| Parameters |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context` | The application context value to use. |

## Public methods

### getMediaPerformanceClass

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

```
public int getMediaPerformanceClass()
```

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 `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html` starting with `https://developer.android.com/reference/android/os/Build.VERSION_CODES.html#R`.

Defaults to `https://developer.android.com/reference/android/os/Build.VERSION.html#MEDIA_PERFORMANCE_CLASS`