OpenMultipleDocuments

class OpenMultipleDocuments : ActivityResultContract<Array<String!>!, MutableList<Uri!>!>
kotlin.Any
   ↳ androidx.activity.result.contract.ActivityResultContract<kotlin.Array<kotlin.String>, kotlin.collections.MutableList<android.net.Uri>>
   ↳ androidx.activity.result.contract.ActivityResultContracts.OpenMultipleDocuments

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

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

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

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: Uris.

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().

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!>