Class DocumentSharingManager
-
- All Implemented Interfaces:
public class DocumentSharingManager
Manager for handling pdf document sharing to other applications.
-
-
Constructor Summary
Constructors Constructor Description DocumentSharingManager()
-
Method Summary
Modifier and Type Method Description static void
shareText(@NonNull() Context context, @Nullable() String text)
Share simple text to other apps. static DocumentSharingController
shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareAction shareAction)
Share document using given action with optional sharing options for processing. static DocumentSharingController
shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareAction shareAction, @Nullable() SharingOptions shareOptions)
Share document using given action with optional sharing options for processing. static DocumentSharingController
shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareTarget shareTarget)
Share document to single share target. static DocumentSharingController
shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareTarget shareTarget, @Nullable() SharingOptions shareOptions)
Share document to single share target with optional sharing options for processing. static DocumentSharingController
shareDocument(@NonNull() DocumentSharingController controller, @NonNull() PdfDocument document)
Share document using given action with optional sharing options for processing. static DocumentSharingController
shareDocument(@NonNull() DocumentSharingController controller, @NonNull() PdfDocument document, @Nullable() SharingOptions shareOptions)
Share document using given action with optional sharing options for processing. static DocumentSharingController
shareEmbeddedFile(@NonNull() Context context, @NonNull() EmbeddedFile embeddedFile, @NonNull() ShareAction shareAction)
Shares embedded file using given share action. static DocumentSharingController
shareEmbeddedFile(@NonNull() EmbeddedFile embeddedFile, @NonNull() DocumentSharingController controller)
Shares embedded file. static DocumentSharingController
shareBitmap(@NonNull() Context context, @NonNull() Bitmap bitmap, @NonNull() ShareAction shareAction)
Shares bitmap with given share action. static DocumentSharingController
shareBitmap(@NonNull() Bitmap bitmap, @NonNull() DocumentSharingController controller)
Shares bitmap. static DocumentSharingController
shareSoundAnnotation(@NonNull() SoundAnnotation soundAnnotation, @NonNull() DocumentSharingController controller)
Shares sound data from sound annotation as a wave (".wav") file. -
-
Method Detail
-
shareText
static void shareText(@NonNull() Context context, @Nullable() String text)
Share simple text to other apps.
- Parameters:
context
- Context of the calling component.text
- Text to be shared to other apps.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareAction shareAction)
Share document using given action with optional sharing options for processing.
- Parameters:
document
- Document to share.shareAction
- Share action that will get executed.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareAction shareAction, @Nullable() SharingOptions shareOptions)
Share document using given action with optional sharing options for processing. When license allows creating new documents,
shareOptions
are used to configure task that will get performed before sharing.- Parameters:
document
- Document to share.shareAction
- Share action that will get executed.shareOptions
- Options used to configure PdfProcessor task that will get performed before sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareTarget shareTarget)
Share document to single share target.
- Parameters:
document
- Document to share.shareTarget
- Target of the share action.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() Context context, @NonNull() PdfDocument document, @NonNull() ShareTarget shareTarget, @Nullable() SharingOptions shareOptions)
Share document to single share target with optional sharing options for processing.
When license allows creating new documents,
shareOptions
are used to configure PdfProcessor task that will get performed before sharing.- Parameters:
document
- Document to share.shareTarget
- Target of the share action.shareOptions
- Options used to configure PdfProcessor task that will get performed before sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() DocumentSharingController controller, @NonNull() PdfDocument document)
Share document using given action with optional sharing options for processing.
- Parameters:
controller
- Controller to use for sharing.document
- Document to share.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareDocument
@NonNull() static DocumentSharingController shareDocument(@NonNull() DocumentSharingController controller, @NonNull() PdfDocument document, @Nullable() SharingOptions shareOptions)
Share document using given action with optional sharing options for processing.
When license allows creating new documents,
shareOptions
are used to configure PdfProcessor task that will get performed before sharing.- Parameters:
controller
- Controller to use for sharing.document
- Document to share.shareOptions
- Options used to configure PdfProcessor task that will get performed before sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareEmbeddedFile
@NonNull() static DocumentSharingController shareEmbeddedFile(@NonNull() Context context, @NonNull() EmbeddedFile embeddedFile, @NonNull() ShareAction shareAction)
Shares embedded file using given share action.
- Parameters:
shareAction
- Share action that will get executed.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareEmbeddedFile
@NonNull() static DocumentSharingController shareEmbeddedFile(@NonNull() EmbeddedFile embeddedFile, @NonNull() DocumentSharingController controller)
Shares embedded file. Sharing process will be managed by provided .
- Parameters:
controller
- Controller to use for sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareBitmap
@NonNull() static DocumentSharingController shareBitmap(@NonNull() Context context, @NonNull() Bitmap bitmap, @NonNull() ShareAction shareAction)
Shares bitmap with given share action.
- Parameters:
bitmap
- Bitmap that should be shared.shareAction
- Share action that will get executed.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareBitmap
@NonNull() static DocumentSharingController shareBitmap(@NonNull() Bitmap bitmap, @NonNull() DocumentSharingController controller)
Shares bitmap. Sharing process will be managed by provided DocumentSharingController.
- Parameters:
bitmap
- Bitmap that should be shared.controller
- Controller to use for sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
shareSoundAnnotation
@NonNull() static DocumentSharingController shareSoundAnnotation(@NonNull() SoundAnnotation soundAnnotation, @NonNull() DocumentSharingController controller)
Shares sound data from sound annotation as a wave (".wav") file. Sharing process will be managed by provided DocumentSharingController.
- Parameters:
controller
- Controller to use for sharing.- Returns:
Sharing controller that can be used to cancel the sharing process.
-
-
-
-