OpenDocumentTree
class OpenDocumentTree : ActivityResultContract<Uri!, Uri!>
kotlin.Any | ||
↳ | androidx.activity.result.contract.ActivityResultContract<android.net.Uri, android.net.Uri> | |
↳ | androidx.activity.result.contract.ActivityResultContracts.OpenDocumentTree |
An ActivityResultContract
to prompt the user to select a directory, returning the user selection as a Uri
. Apps can fully manage documents within the returned directory.
The input is an optional Uri
of the initial starting location.
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, @Nullable input: Uri?) |
ActivityResultContract.SynchronousResult<Uri!>? |
getSynchronousResult(@NonNull context: Context, @Nullable input: Uri?) |
Uri? |
parseResult(resultCode: Int, @Nullable intent: Intent?) |
Public constructors
<init>
OpenDocumentTree()
An ActivityResultContract
to prompt the user to select a directory, returning the user selection as a Uri
. Apps can fully manage documents within the returned directory.
The input is an optional Uri
of the initial starting location.
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,
@Nullable input: Uri?
): Intent
getSynchronousResult
@Nullable fun getSynchronousResult(
@NonNull context: Context,
@Nullable input: Uri?
): ActivityResultContract.SynchronousResult<Uri!>?