OpenMultipleDocuments
class OpenMultipleDocuments : ActivityResultContract<Array<String!>!, MutableList<Uri!>!>
An ActivityResultContract
to prompt the user to open (possibly multiple) documents, receiving their contents as file:/http:/content:
Uri
s.
The input is the mime types to filter by, e.g. image/*
.
This can be extended to override createIntent
if you wish to pass additional extras to the Intent created by super.createIntent()
.
Summary
Public constructors | |
---|---|
<init>() An |
Public methods | |
---|---|
open Intent |
createIntent(@NonNull context: Context, @NonNull input: Array<String!>) |
ActivityResultContract.SynchronousResult<MutableList<Uri!>!>? |
getSynchronousResult(@NonNull context: Context, @NonNull input: Array<String!>) |
MutableList<Uri!> |
parseResult(resultCode: Int, @Nullable intent: Intent?) |
Public constructors
<init>
OpenMultipleDocuments()
An ActivityResultContract
to prompt the user to open (possibly multiple) documents, receiving their contents as file:/http:/content:
Uri
s.
The input is the mime types to filter by, e.g. image/*
.
This can be extended to override createIntent
if you wish to pass additional extras to the Intent created by super.createIntent()
.
See Also
Public methods
createIntent
@CallSuper @NonNull open fun createIntent(
@NonNull context: Context,
@NonNull input: Array<String!>
): Intent
getSynchronousResult
@Nullable fun getSynchronousResult(
@NonNull context: Context,
@NonNull input: Array<String!>
): ActivityResultContract.SynchronousResult<MutableList<Uri!>!>?
parseResult
@NonNull fun parseResult(
resultCode: Int,
@Nullable intent: Intent?
): MutableList<Uri!>