# androidx.activity.result.contract

*** ** * ** ***

## Interfaces

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType` | Represents filter input type accepted by the photo picker. |

## Classes

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` | A contract specifying that an activity can be called with an input of type `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` and produce an output of type `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract.SynchronousResult` | The wrapper for a result provided in `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract#getSynchronousResult(android.content.Context,kotlin.Any)`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts` | A collection of some standard activity call contracts, as provided by android. |
| `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`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CreateDocument` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to select a path for creating a new document of the given `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.CreateDocument#mimeType()`, returning the `content:` `https://developer.android.com/reference/android/net/Uri.html` of the item that was created. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.GetContent` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to pick a piece of content, receiving a `content://` `https://developer.android.com/reference/android/net/Uri.html` for that content that allows you to use `https://developer.android.com/reference/android/content/ContentResolver.html#openInputStream(android.net.Uri)` to access the raw data. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.GetMultipleContents` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to pick one or more a pieces of content, receiving a `content://` `https://developer.android.com/reference/android/net/Uri.html` for each piece of content that allows you to use `https://developer.android.com/reference/android/content/ContentResolver.html#openInputStream(android.net.Uri)` to access the raw data. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.OpenDocument` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to open a document, receiving its contents as a `file:/http:/content:` `https://developer.android.com/reference/android/net/Uri.html`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.OpenDocumentTree` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to select a directory, returning the user selection as a `https://developer.android.com/reference/android/net/Uri.html`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.OpenMultipleDocuments` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to prompt the user to open (possibly multiple) documents, receiving their contents as `file:/http:/content:` `https://developer.android.com/reference/android/net/Uri.html`s. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickContact` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to request the user to pick a contact from the contacts app. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickMultipleVisualMedia` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to use the [Photo Picker](https://developer.android.com/training/data-storage/shared/photopicker) to select multiple images, videos, or other types of visual media. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to use the [Photo Picker](https://developer.android.com/training/data-storage/shared/photopicker) to select a single image, video, or other type of visual media. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab` | Represents filter input type accepted by the photo picker. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities` | Represents the media capabilities of an application. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities.Builder` | A builder for constructing `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.MediaCapabilities` instances. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.SingleMimeType` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType` class used to filter a single mime type only when using the photo picker. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestMultiplePermissions` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/app/Activity.html#requestPermissions(java.lang.String[], int)` |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.RequestPermission` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/app/Activity.html#requestPermissions(java.lang.String[], int)` |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.StartActivityForResult` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` that doesn't do any type conversion, taking raw `https://developer.android.com/reference/android/content/Intent.html` as an input and `https://developer.android.com/reference/kotlin/androidx/activity/result/ActivityResult` as an output. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.StartIntentSenderForResult` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` that calls `https://developer.android.com/reference/android/app/Activity.html#startIntentSender(android.content.IntentSender, android.content.Intent, int, int, int)`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakePicture` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE` saving it into the provided content-`https://developer.android.com/reference/android/net/Uri.html`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakePicturePreview` | An `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContract` to `https://developer.android.com/reference/android/provider/MediaStore.html#ACTION_IMAGE_CAPTURE` preview, returning it as a `https://developer.android.com/reference/android/graphics/Bitmap.html`. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.TakeVideo` | **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. |

## Objects

|---|---|
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.AlbumsTab` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab` object used to open the picker in Albums tab. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab.PhotosTab` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.DefaultTab` object used to open the picker in Photos tab (also the default if no value is provided). |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.ImageAndVideo` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType` object used to filter images and video when using the photo picker. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.ImageOnly` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType` object used to filter images only when using the photo picker. |
| `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VideoOnly` | `https://developer.android.com/reference/kotlin/androidx/activity/result/contract/ActivityResultContracts.PickVisualMedia.VisualMediaType` object used to filter video only when using the photo picker. |