# ActivityResultContracts.TakeVideo

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.TakeVideo) Added in [1.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/activity#1.3.0)

*** ** * ** ***


```
open class ActivityResultContracts.TakeVideo : ActivityResultContract<Uri, Bitmap?>
```

<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), [Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html)?\> ||
|   | ↳ | [androidx.activity.result.contract.ActivityResultContracts.TakeVideo](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo) |

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
> The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. Use {@link CaptureVideo} instead.

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 a thumbnail.

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

## Summary

| ### Public constructors |
|---|
| `[TakeVideo](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#TakeVideo())()` **This function is deprecated.** The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. |

| ### Public functions |
|---|---|
| `open https://developer.android.com/reference/android/content/Intent.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper [createIntent](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#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)` **This function is deprecated.** The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. |
| `final https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://developer.android.com/reference/android/graphics/Bitmap.html?>?` | `[getSynchronousResult](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#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)` **This function is deprecated.** The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. |
| `final https://developer.android.com/reference/android/graphics/Bitmap.html?` | `[parseResult](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#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?)` **This function is deprecated.** The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. |

## Public constructors

### TakeVideo

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

```
[TakeVideo](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#TakeVideo())()
```

> [!CAUTION]
> **This function is deprecated.**   
> The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. Use {@link CaptureVideo} instead.

## Public functions

### createIntent

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

```
@CallSuper
open fun [createIntent](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#createIntent(android.content.Context,android.net.Uri))(context: Context, input: Uri): Intent
```

> [!CAUTION]
> **This function is deprecated.**   
> The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. Use {@link CaptureVideo} instead.

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.2.0](https://developer.android.com/jetpack/androidx/releases/activity#1.2.0) Deprecated in [1.3.0](https://developer.android.com/jetpack/androidx/releases/activity#1.3.0)

```
final fun [getSynchronousResult](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#getSynchronousResult(android.content.Context,android.net.Uri))(context: Context, input: Uri): ActivityResultContract.SynchronousResult<Bitmap?>?
```

> [!CAUTION]
> **This function is deprecated.**   
> The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. Use {@link CaptureVideo} instead.

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://developer.android.com/reference/android/graphics/Bitmap.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](https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#parseResult(kotlin.Int,android.content.Intent))(resultCode: Int, intent: Intent?): Bitmap?
```

> [!CAUTION]
> **This function is deprecated.**   
> The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. Use {@link CaptureVideo} instead.

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`.