getDestinationUri

open fun getDestinationUri(@NonNull action: String): Maybe<Uri>

The file picker opens a default Android SAF by an intent with a given action. The file picker might cancel the operation, in which case the returned Maybe instance completes without emitting a value. Reasons for cancellation might be user interaction, like cancelling selection of a destination inside SAF picker. Supported intent actions are ACTION_OPEN_DOCUMENT, and ACTION_CREATE_DOCUMENT.

Parameters

action

Given action used to create an intent for opening Android SAF.


abstract fun getDestinationUri(@NonNull action: String, @Nullable fileName: String): Maybe<Uri>

The file picker opens a default Android SAF by an intent with a given action. The file picker might cancel the operation, in which case the returned Maybe instance completes without emitting a value. Reasons for cancellation might be user interaction, like cancelling selection of a destination inside SAF picker. Supported intent actions are ACTION_OPEN_DOCUMENT, and ACTION_CREATE_DOCUMENT.

Parameters

action

Given action used to create an intent for opening Android SAF.

fileName

File name (without the .pdf extension) that should be pre-filled in the file picker. Can be null to use empty file name.