OpenDocument
class OpenDocument : ActivityResultContract<Array<String!>!, Uri!>
kotlin.Any | ||
↳ | androidx.activity.result.contract.ActivityResultContract<kotlin.Array<kotlin.String>, android.net.Uri> | |
↳ | androidx.activity.result.contract.ActivityResultContracts.OpenDocument |
An ActivityResultContract
to prompt the user to open a document, receiving its contents as a file:/http:/content:
Uri
.
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<Uri!>? |
getSynchronousResult(@NonNull context: Context, @NonNull input: Array<String!>) |
Uri? |
parseResult(resultCode: Int, @Nullable intent: Intent?) |
Public constructors
<init>
OpenDocument()
An ActivityResultContract
to prompt the user to open a document, receiving its contents as a file:/http:/content:
Uri
.
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<Uri!>?