ActivityResultContract
abstract class ActivityResultContract<I : Any!, O : Any!>
Known Direct Subclasses
ActivityResultContracts.CreateDocument, ActivityResultContracts.GetContent, ActivityResultContracts.GetMultipleContents, ActivityResultContracts.OpenDocument, ActivityResultContracts.OpenDocumentTree, ActivityResultContracts.OpenMultipleDocuments, ActivityResultContracts.PickContact, ActivityResultContracts.RequestMultiplePermissions, ActivityResultContracts.RequestPermission, ActivityResultContracts.StartActivityForResult, ActivityResultContracts.StartIntentSenderForResult, ActivityResultContracts.TakePicture, and 3 others.
ActivityResultContracts.CreateDocument |
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.
|
ActivityResultContracts.GetContent |
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.
|
ActivityResultContracts.GetMultipleContents |
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.
|
ActivityResultContracts.OpenDocument |
An ActivityResultContract to prompt the user to open a document, receiving its contents as a file:/http:/content: Uri .
|
ActivityResultContracts.OpenDocumentTree |
An ActivityResultContract to prompt the user to select a directory, returning the user selection as a Uri .
|
ActivityResultContracts.OpenMultipleDocuments |
An ActivityResultContract to prompt the user to open (possibly multiple) documents, receiving their contents as file:/http:/content: Uri s.
|
ActivityResultContracts.PickContact |
An ActivityResultContract to request the user to pick a contact from the contacts app.
|
ActivityResultContracts.RequestMultiplePermissions |
An ActivityResultContract to request permissions
|
ActivityResultContracts.RequestPermission |
An ActivityResultContract to request a permission
|
ActivityResultContracts.StartActivityForResult |
An ActivityResultContract that doesn't do any type conversion, taking raw Intent as an input and ActivityResult as an output.
|
ActivityResultContracts.StartIntentSenderForResult |
An ActivityResultContract that calls Activity#startIntentSender(IntentSender, Intent, int, int, int).
|
ActivityResultContracts.TakePicture |
An ActivityResultContract to take a picture saving it into the provided content-Uri .
|
ActivityResultContracts.TakePicturePreview |
An ActivityResultContract to take small a picture preview, returning it as a Bitmap .
|
ActivityResultContracts.TakeVideo |
An ActivityResultContract to take a video saving it into the provided content-Uri .
|
WatchFaceEditorContract |
An ActivityResultContract for invoking a watch face editor.
|
|
A contract specifying that an activity can be called with an input of type I and produce an output of type O Makes calling an activity for result type-safe.
Summary
Public constructors |
A contract specifying that an activity can be called with an input of type I and produce an output of type O Makes calling an activity for result type-safe.
|
Public constructors
<init>
ActivityResultContract()
A contract specifying that an activity can be called with an input of type I and produce an output of type O Makes calling an activity for result type-safe.
Public methods
createIntent
@NonNull abstract fun createIntent(
@NonNull context: Context,
input: I
): Intent
Create an intent that can be used for Activity#startActivityForResult
getSynchronousResult
@Nullable open fun getSynchronousResult(
@NonNull context: Context,