# androidx.activity.result

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback` | A type-safe callback to be called when an `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` is available. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller` | A class that can call `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`-style APIs without having to manage request codes, and converting request/response to an `https://developer.android.com/reference/android/content/Intent.html` |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistryOwner` | A class that has an `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry` that allows you to register a `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback` for handling an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` | A container for an activity result as obtained from `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher` | A launcher for a previously-`https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` to start the process of executing an `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` that takes an `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher` as its required input. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry` | A registry that stores `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCallback` for `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/IntentSenderRequest` | A request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.StartIntentSenderForResult` Activity Contract. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/IntentSenderRequest.Builder` | A builder for constructing `https://developer.android.com/reference/kotlin/androidx/activity/result/IntentSenderRequest` instances. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | A request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest.Builder` | A builder for constructing `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` instances. |

## Top-level functions summary

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | `https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#PickVisualMediaRequest(androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.VisualMediaType,kotlin.Int,kotlin.Boolean,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.DefaultTab)( mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType, maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab )` Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | `https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#PickVisualMediaRequest(kotlin.Long,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.VisualMediaType,kotlin.Int,kotlin.Boolean,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.DefaultTab)( accentColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType, maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab )` Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 33) https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#PickVisualMediaRequest(androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.MediaCapabilities,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.VisualMediaType,kotlin.Int,kotlin.Boolean,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.DefaultTab)( mediaCapabilitiesForTranscoding: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities?, mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType, maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab )` Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | `@https://developer.android.com/reference/kotlin/androidx/annotation/RequiresApi(value = 33) https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#PickVisualMediaRequest(androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.MediaCapabilities,kotlin.Long,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.VisualMediaType,kotlin.Int,kotlin.Boolean,androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.DefaultTab)( mediaCapabilitiesForTranscoding: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities?, accentColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html, mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType, maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html, defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab )` Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract. |

## Extension functions summary

|---|---|
| `operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResult).component1()()` Destructuring declaration for `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` to provide the requestCode |
| `operator https://developer.android.com/reference/android/content/Intent.html?` | `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResult).component2()()` Destructuring declaration for `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` to provide the intent |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<https://developer.android.com/reference/java/lang/Void.html?>.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResultLauncher).launch(androidx.core.app.ActivityOptionsCompat)(options: https://developer.android.com/reference/kotlin/androidx/core/app/ActivityOptionsCompat?)` Convenience method to launch a no-argument registered call without needing to pass in `null`. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResultLauncher).launch(androidx.core.app.ActivityOptionsCompat)(options: https://developer.android.com/reference/kotlin/androidx/core/app/ActivityOptionsCompat?)` Convenience method to launch a no-argument registered call without needing to pass in `Unit`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>` | `<I : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, O : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResultCaller).registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,kotlin.Any,kotlin.Function1)( contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I, O>, input: I, callback: (O) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A version of `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` that additionally takes an input right away, producing a launcher that doesn't take any additional input when called. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultLauncher<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html>` | `<I : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?, O : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller.https://developer.android.com/reference/kotlin/androidx/activity/result/package-summary#(androidx.activity.result.ActivityResultCaller).registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,kotlin.Any,androidx.activity.result.ActivityResultRegistry,kotlin.Function1)( contract: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract<I, O>, input: I, registry: https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultRegistry, callback: (O) -> https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html )` A version of `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` that additionally takes an input right away, producing a launcher that doesn't take any additional input when called. |

## Top-level functions

### PickVisualMediaRequest

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/PickVisualMediaRequest.kt+function:PickVisualMediaRequest) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/activity#1.10.0)

```
fun PickVisualMediaRequest(
    mediaType: ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo,
    maxItems: @IntRange(from = 2) Int = PickMultipleVisualMedia.getMaxItems(),
    isOrderedSelection: Boolean = false,
    defaultTab: ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab
): PickVisualMediaRequest
```

Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract.

| Parameters |
|---|---|
| `mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo` | type to go into the PickVisualMediaRequest |
| `maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = PickMultipleVisualMedia.getMaxItems()` | limit the number of selectable items when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` |
| `isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether the user can control the order of selected media when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` (defaults to false) |
| `defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab` | the tab to initially open the picker in (defaults to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.PhotosTab`). Note that the support for this parameter was added in API level 35 / R ext 12 and applies the default behavior for older versions. Also see `https://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_PICK_IMAGES_LAUNCH_TAB` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | a PickVisualMediaRequest that contains the given input |

### PickVisualMediaRequest

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/PickVisualMediaRequest.kt+function:PickVisualMediaRequest) Added in [1.10.0](https://developer.android.com/jetpack/androidx/releases/activity#1.10.0)

```
fun PickVisualMediaRequest(
    accentColor: Long,
    mediaType: ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo,
    maxItems: @IntRange(from = 2) Int = PickMultipleVisualMedia.getMaxItems(),
    isOrderedSelection: Boolean = false,
    defaultTab: ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab
): PickVisualMediaRequest
```

Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract.

| Parameters |
|---|---|
| `accentColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | color long to customize picker accent color. Note that the support for this parameter was added in API level 35 / R ext 12 and applies the default behavior for older versions. Also see `https://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_PICK_IMAGES_ACCENT_COLOR` |
| `mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo` | type to go into the PickVisualMediaRequest |
| `maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = PickMultipleVisualMedia.getMaxItems()` | limit the number of selectable items when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` |
| `isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether the user can control the order of selected media when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` (defaults to false) |
| `defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab` | the tab to initially open the picker in (defaults to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.PhotosTab`). Note that the support for this parameter was added in API level 35 / R ext 12 and applies the default behavior for older versions. Also see `https://developer.android.com/reference/android/provider/MediaStore.html#EXTRA_PICK_IMAGES_LAUNCH_TAB` |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | a PickVisualMediaRequest that contains the given input |

### PickVisualMediaRequest

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/PickVisualMediaRequest.kt+function:PickVisualMediaRequest) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/activity#1.11.0)

```
@RequiresApi(value = 33)
fun PickVisualMediaRequest(
    mediaCapabilitiesForTranscoding: ActivityResultContracts.PickVisualMedia.MediaCapabilities?,
    mediaType: ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo,
    maxItems: @IntRange(from = 2) Int = PickMultipleVisualMedia.getMaxItems(),
    isOrderedSelection: Boolean = false,
    defaultTab: ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab
): PickVisualMediaRequest
```

Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract.

| Parameters |
|---|---|
| `mediaCapabilitiesForTranscoding: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities?` | the `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities` that the application can handle. |
| `mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo` | type to go into the PickVisualMediaRequest |
| `maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = PickMultipleVisualMedia.getMaxItems()` | limit the number of selectable items when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` |
| `isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether the user can control the order of selected media when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` (defaults to false) |
| `defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab` | the tab to initially open in the picker (defaults to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.PhotosTab`) |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | a PickVisualMediaRequest that contains the given input |

### PickVisualMediaRequest

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/PickVisualMediaRequest.kt+function:PickVisualMediaRequest) Added in [1.11.0](https://developer.android.com/jetpack/androidx/releases/activity#1.11.0)

```
@RequiresApi(value = 33)
fun PickVisualMediaRequest(
    mediaCapabilitiesForTranscoding: ActivityResultContracts.PickVisualMedia.MediaCapabilities?,
    accentColor: Long,
    mediaType: ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo,
    maxItems: @IntRange(from = 2) Int = PickMultipleVisualMedia.getMaxItems(),
    isOrderedSelection: Boolean = false,
    defaultTab: ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab
): PickVisualMediaRequest
```

Creates a request for a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` or `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` Activity Contract.

| Parameters |
|---|---|
| `mediaCapabilitiesForTranscoding: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities?` | the `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities` that the application can handle. |
| `accentColor: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | color long to customize picker accent color |
| `mediaType: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType = ImageAndVideo` | type to go into the PickVisualMediaRequest |
| `maxItems: @https://developer.android.com/reference/kotlin/androidx/annotation/IntRange(from = 2) https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html = PickMultipleVisualMedia.getMaxItems()` | limit the number of selectable items when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` |
| `isOrderedSelection: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html = false` | whether the user can control the order of selected media when using `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` (defaults to false) |
| `defaultTab: https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab = DefaultTab.PhotosTab` | the tab to initially open in the picker (defaults to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.PhotosTab`) |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/PickVisualMediaRequest` | a PickVisualMediaRequest that contains the given input |

## Extension functions

### ActivityResult.component1

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResult.kt+function:component1) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/activity#1.9.0)

```
operator fun ActivityResult.component1(): Int
```

Destructuring declaration for `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` to provide the requestCode

| Returns |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the resultCode of the `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` |

### ActivityResult.component2

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResult.kt+function:component2) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/activity#1.9.0)

```
operator fun ActivityResult.component2(): Intent?
```

Destructuring declaration for `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` to provide the intent

| Returns |
|---|---|
| `https://developer.android.com/reference/android/content/Intent.html?` | the intent of the `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` |

### ActivityResultLauncher.launch

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResultLauncher.kt+function:launch) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/activity#1.9.0)

```
fun ActivityResultLauncher<Void?>.launch(
    options: ActivityOptionsCompat? = null
): Unit
```

Convenience method to launch a no-argument registered call without needing to pass in `null`.

### ActivityResultLauncher.launch

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResultLauncher.kt+function:launch) Added in [1.9.0](https://developer.android.com/jetpack/androidx/releases/activity#1.9.0)

```
fun ActivityResultLauncher<Unit>.launch(
    options: ActivityOptionsCompat? = null
): Unit
```

Convenience method to launch a no-argument registered call without needing to pass in `Unit`.

### ActivityResultCaller.registerForActivityResult

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResultCaller.kt+function:registerForActivityResult)

```
fun <I : Any?, O : Any?> ActivityResultCaller.registerForActivityResult(
    contract: ActivityResultContract<I, O>,
    input: I,
    callback: (O) -> Unit
): ActivityResultLauncher<Unit>
```

A version of `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` |   |

### ActivityResultCaller.registerForActivityResult

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/ActivityResultCaller.kt+function:registerForActivityResult)

```
fun <I : Any?, O : Any?> ActivityResultCaller.registerForActivityResult(
    contract: ActivityResultContract<I, O>,
    input: I,
    registry: ActivityResultRegistry,
    callback: (O) -> Unit
): ActivityResultLauncher<Unit>
```

A version of `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` that additionally takes an input right away, producing a launcher that doesn't take any additional input when called.

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResultCaller#registerForActivityResult(androidx.activity.result.contract.ActivityResultContract,androidx.activity.result.ActivityResultCallback)` |   |