# SelectionParams

Artifact: [androidx.photopicker:photopicker-activity](https://developer.android.com/jetpack/androidx/releases/photopicker) [View Source](https://cs.android.com/search?q=file:androidx/photopicker/activity/params/SelectionParams.kt+class:androidx.photopicker.activity.params.SelectionParams) Added in [1.0.0-alpha03](https://developer.android.com/jetpack/androidx/releases/photopicker#1.0.0-alpha03)

*** ** * ** ***


```
@RequiresApi(value = 26)
class SelectionParams
```

<br />

*** ** * ** ***

Represents selection constraints for the photo picker.

This class allows specifying constraints that the selected media items must satisfy. By providing this information to `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/PickVisualMediaRequest`, the photo picker will disable selection of items in the picker grid that violate these constraints.

Callers should use `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams.Builder` to construct an instance of this class.

| See also |
|---|---|
| `https://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_PICK_IMAGES_SELECTION_PARAMS` |   |
| `https://developer.android.com/reference/android/widget/photopicker/PhotoPickerSelectionParams.html` |   |

## Summary

| ### Nested types |
|---|
| `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 26) class https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams.Builder` A builder for constructing `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams` instances. |

| ### Public properties |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#maxMediaItemResolutionInPixels()` The maximum allowed resolution in total pixels, or `-1` if unrestricted (default). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#maxMediaItemSizeInBytes()` The maximum allowed size, in bytes, for an individual media item, or `-1` if unrestricted (default). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#maxSelectionBatchSizeInBytes()` The maximum allowed cumulative size, in bytes, for the entire batch of selected media items, or `-1` if unrestricted (default). |
| `https://developer.android.com/reference/java/time/Duration.html?` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#maxVideoDuration()` The maximum allowed duration for a video media item, or `null` if unrestricted (default). |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html>` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#mimeTypes()` The list of allowed mime types that items must match to be selectable. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#minMediaItemResolutionInPixels()` The minimum required resolution in total pixels, or `-1` if unrestricted (default). |
| `https://developer.android.com/reference/java/time/Duration.html?` | `https://developer.android.com/reference/kotlin/androidx/photopicker/activity/params/SelectionParams#minVideoDuration()` The minimum required duration for a video media item, or `null` if unrestricted (default). |

## Public properties

### maxMediaItemResolutionInPixels

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

```
val maxMediaItemResolutionInPixels: Long
```

The maximum allowed resolution in total pixels, or `-1` if unrestricted (default).

### maxMediaItemSizeInBytes

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

```
val maxMediaItemSizeInBytes: Long
```

The maximum allowed size, in bytes, for an individual media item, or `-1` if unrestricted (default).

### maxSelectionBatchSizeInBytes

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

```
val maxSelectionBatchSizeInBytes: Long
```

The maximum allowed cumulative size, in bytes, for the entire batch of selected media items, or `-1` if unrestricted (default).

### maxVideoDuration

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

```
val maxVideoDuration: Duration?
```

The maximum allowed duration for a video media item, or `null` if unrestricted (default).

### mimeTypes

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

```
val mimeTypes: List<String>
```

The list of allowed mime types that items must match to be selectable. If empty, all mime types are allowed (default).

### minMediaItemResolutionInPixels

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

```
val minMediaItemResolutionInPixels: Long
```

The minimum required resolution in total pixels, or `-1` if unrestricted (default).

### minVideoDuration

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

```
val minVideoDuration: Duration?
```

The minimum required duration for a video media item, or `null` if unrestricted (default).