Companion
object Companion
Static helpers for preparing documents, files, bitmaps and annotations for sharing.
Functions
Link copied to clipboard
suspend fun prepareBitmapForSharing(context: Context, bitmap: Bitmap, compressFormat: Bitmap.CompressFormat, compressQuality: Int, fileName: String?): Uri
Writes bitmap to directory backed by DocumentSharingProvider.
Link copied to clipboard
suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, documentName: String?): Uri
suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, processorTask: PdfProcessorTask, documentName: String?): Uri
suspend fun prepareDocumentForSharing(context: Context, document: PdfDocument, processorTask: PdfProcessorTask, documentName: String?, progressListener: DocumentSharingProviderProcessor.PdfProcessorProgressListener?): Uri
Prepares document for sharing via Android share framework.
Link copied to clipboard
Extracts embedded file to directory backed by DocumentSharingProvider.
Link copied to clipboard
suspend fun prepareFileForSharing(context: Context, fileDataProvider: DataProvider, fileName: String?): Uri
Writes file to directory backed by DocumentSharingProvider.
Link copied to clipboard
suspend fun prepareSoundAnnotationForSharing(context: Context, soundAnnotation: SoundAnnotation): Uri
suspend fun prepareSoundAnnotationForSharing(context: Context, soundAnnotation: SoundAnnotation, fileName: String?): Uri
Extracts audio data embedded in a SoundAnnotation to a directory backed by DocumentSharingProvider. Audio data is written as a WAV file.
Link copied to clipboard
Checks whether sound annotation can be shared: is attached to document and has audio data in supported format (i.e. with encoding AudioEncoding.SIGNED).