Google is committed to advancing racial equity for Black communities. See how.

ActivityResultContracts

class ActivityResultContracts
kotlin.Any
   ↳ androidx.activity.result.contract.ActivityResultContracts

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

Summary

Nested classes

An ActivityResultContract to prompt the user to select a path for creating a new document, 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(Uri) 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(Uri) 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 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(IntentSender, Intent, int, int, int).

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.

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