# ActivityResultContracts.CaptureVideo

Artifact: [androidx.activity:activity](https://developer.android.com/jetpack/androidx/releases/activity) [View Source](https://cs.android.com/search?q=file:androidx/activity/result/contract/ActivityResultContracts.kt+class:androidx.activity.result.contract.ActivityResultContracts.CaptureVideo) Added in [1.3.0](https://developer.android.com/jetpack/androidx/releases/activity#1.3.0)

*** ** * ** ***


```
open class ActivityResultContracts.CaptureVideo : ActivityResultContract<Uri, Boolean>
```

<br />

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.activity.result.contract.ActivityResultContract](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract)\<[Uri](https://developer.android.com/reference/android/net/Uri.html), [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)\> ||
|   | ↳ | [androidx.activity.result.contract.ActivityResultContracts.CaptureVideo](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo) |

*** ** * ** ***

An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_VIDEO_CAPTURE` saving it into the provided content-`https://developer.android.com/reference/android/net/Uri.html`.

Returns `true` if the video was saved into the given `https://developer.android.com/reference/android/net/Uri.html`.

This can be extended to override `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo#createIntent(android.content.Context,android.net.Uri)` if you wish to pass additional extras to the Intent created by `super.createIntent()`.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo#CaptureVideo()()` |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/android/content/Intent.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo#createIntent(android.content.Context,android.net.Uri)(context: https://developer.android.com/reference/android/content/Context.html, input: https://developer.android.com/reference/android/net/Uri.html)` Create an intent that can be used for `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`. |
| `final https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>?` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo#getSynchronousResult(android.content.Context,android.net.Uri)(context: https://developer.android.com/reference/android/content/Context.html, input: https://developer.android.com/reference/android/net/Uri.html)` An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity. |
| `final https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CaptureVideo#parseResult(kotlin.Int,android.content.Intent)(resultCode: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, intent: https://developer.android.com/reference/android/content/Intent.html?)` Convert result obtained from `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`. |

## Public constructors

### CaptureVideo

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

```
CaptureVideo()
```

## Public functions

### createIntent

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

```
@CallSuper
open fun createIntent(context: Context, input: Uri): Intent
```

Create an intent that can be used for `https://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int)`.

### getSynchronousResult

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

```
final fun getSynchronousResult(context: Context, input: Uri): ActivityResultContract.SynchronousResult<Boolean>?
```

An optional method you can implement that can be used to potentially provide a result in lieu of starting an activity.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html>?` | the result wrapped in a `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult` or `null` if the call should proceed to start an activity. |

### parseResult

```
final fun parseResult(resultCode: Int, intent: Intent?): Boolean
```

Convert result obtained from `https://developer.android.com/reference/android/app/Activity.html#onActivityResult(int, int, android.content.Intent)` to `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`.