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

*** ** * ** ***


```
public class ActivityResultContracts.TakeVideo extends ActivityResultContract<@NonNull Uri, Bitmap>
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.activity.result.contract.ActivityResultContract](https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContract)\<@[NonNull](https://developer.android.com/reference/androidx/annotation/NonNull) [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/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/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/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/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#TakeVideo())()` **This method is deprecated.** The thumbnail bitmap is rarely returned and is not a good signal to determine whether the video was actually successfully captured. |

| ### Public methods |
|---|---|
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Intent.html` | `@https://developer.android.com/reference/androidx/annotation/CallSuper [createIntent](https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#createIntent(android.content.Context,android.net.Uri))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html input)` **This method 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/androidx/activity/result/contract/ActivityResultContract.SynchronousResult<https://developer.android.com/reference/android/graphics/Bitmap.html>` | `[getSynchronousResult](https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#getSynchronousResult(android.content.Context,android.net.Uri))(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html input)` **This method 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/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#parseResult(kotlin.Int,android.content.Intent))(int resultCode, https://developer.android.com/reference/android/content/Intent.html intent)` **This method 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)

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

> [!CAUTION]
> **This method 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 methods

### 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
public @NonNull Intent [createIntent](https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#createIntent(android.content.Context,android.net.Uri))(@NonNull Context context, @NonNull Uri input)
```

> [!CAUTION]
> **This method 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)

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

> [!CAUTION]
> **This method 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/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/androidx/activity/result/contract/ActivityResultContract.SynchronousResult` or `null` if the call should proceed to start an activity. |

### parseResult

```
public final Bitmap [parseResult](https://developer.android.com/reference/androidx/activity/result/contract/ActivityResultContracts.TakeVideo#parseResult(kotlin.Int,android.content.Intent))(int resultCode, Intent intent)
```

> [!CAUTION]
> **This method 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/androidx/activity/result/contract/ActivityResultContract`.