ActivityResultContracts


class ActivityResultContracts


A collection of some standard activity call contracts, as provided by android.

Summary

Nested types

An ActivityResultContract to take a video saving it into the provided content-Uri.

An ActivityResultContract to prompt the user to select a path for creating a new document of the given mimeType, returning the content: Uri of the item that was created.

An ActivityResultContract to prompt the user to pick a piece of content, receiving a content:// Uri for that content that allows you to use android.content.ContentResolver.openInputStream to access the raw data.

An ActivityResultContract to prompt the user to pick one or more a pieces of content, receiving a content:// Uri for each piece of content that allows you to use android.content.ContentResolver.openInputStream to access the raw data.

An ActivityResultContract to prompt the user to open a document, receiving its contents as a file:/http:/content: Uri.

An ActivityResultContract to prompt the user to select a directory, returning the user selection as a Uri.

An ActivityResultContract to prompt the user to open (possibly multiple) documents, receiving their contents as file:/http:/content: Uris.

An ActivityResultContract to request the user to pick a contact from the contacts app.

An ActivityResultContract to use the Photo Picker to select multiple images, videos, or other types of visual media.

An ActivityResultContract to use the Photo Picker to select a single image, video, or other type of visual media.

Represents filter input type accepted by the photo picker.

DefaultTab object used to open the picker in Albums tab.

DefaultTab object used to open the picker in Photos tab (also the default if no value is provided).

VisualMediaType object used to filter images and video when using the photo picker.

VisualMediaType object used to filter images only when using the photo picker.

VisualMediaType class used to filter a single mime type only when using the photo picker.

VisualMediaType object used to filter video only when using the photo picker.

Represents filter input type accepted by the photo picker.

An ActivityResultContract to request permissions

An ActivityResultContract to request a permission

An ActivityResultContract that doesn't do any type conversion, taking raw Intent as an input and ActivityResult as an output.

An ActivityResultContract that calls Activity.startIntentSender.

An ActivityResultContract to take a picture saving it into the provided content-Uri.

An ActivityResultContract to take small a picture preview, returning it as a Bitmap.

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.