prepareDocumentForSharing

suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, processorTask: PdfProcessorTask, documentName: String?): Uri

Prepares document for sharing via Android share framework.

Return

Uri that can be used for sharing the document to other apps.

Parameters

document

Document we are going to share.

processorTask

Task to use for processing the document before sharing.

documentName

Optional document name used for sharing (this is the shared document file name as seen by other apps).

Throws

if the document could not be exported for sharing.


suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, processorTask: PdfProcessorTask, documentName: String?, progressListener: DocumentSharingProviderProcessor.PdfProcessorProgressListener?): Uri

Prepares document for sharing via Android share framework.

Return

Uri that can be used for sharing the document to other apps.

Parameters

document

Document that should be shared.

processorTask

Task to use for processing the document before sharing.

documentName

Optional document name used for sharing (this is the shared document file name as seen by other apps).

progressListener

Optional listener for PdfProcessor progress.

Throws

if the document could not be exported for sharing.


suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, documentName: String?): Uri

Prepares document for sharing via Android share framework.

Return

Uri that can be used for sharing the document to other apps.

Parameters

document

Document that should be shared.

documentName

Optional document name used for sharing (this is the shared document file name as seen by other apps).

Throws

if the document could not be exported for sharing.