public class

DocumentSharingManager

extends Object
java.lang.Object
   ↳ com.pspdfkit.document.sharing.DocumentSharingManager

Class Overview

Manager for handling pdf document sharing to other applications.

Summary

Public Constructors
DocumentSharingManager()
Public Methods
static DocumentSharingController shareBitmap(Bitmap bitmap, DocumentSharingController controller)
Shares bitmap.
static DocumentSharingController shareBitmap(Context context, Bitmap bitmap, ShareAction shareAction)
Shares bitmap with given share action.
static DocumentSharingController shareDocument(Context context, PdfDocument document, ShareTarget shareTarget)
Share document to single share target.
static DocumentSharingController shareDocument(DocumentSharingController controller, PdfDocument document, SharingOptions shareOptions)
Share document using given action with optional sharing options for processing.
static DocumentSharingController shareDocument(Context context, PdfDocument document, ShareTarget shareTarget, SharingOptions shareOptions)
Share document to single share target with optional sharing options for processing.
static DocumentSharingController shareDocument(Context context, PdfDocument document, ShareAction shareAction, SharingOptions shareOptions)
Share document using given action with optional sharing options for processing.
static DocumentSharingController shareDocument(Context context, PdfDocument document, ShareAction shareAction)
Share document using given action with optional sharing options for processing.
static DocumentSharingController shareDocument(DocumentSharingController controller, PdfDocument document)
Share document using given action with optional sharing options for processing.
static DocumentSharingController shareEmbeddedFile(EmbeddedFile embeddedFile, DocumentSharingController controller)
Shares embedded file.
static DocumentSharingController shareEmbeddedFile(Context context, EmbeddedFile embeddedFile, ShareAction shareAction)
Shares embedded file using given share action.
static DocumentSharingController shareSoundAnnotation(SoundAnnotation soundAnnotation, DocumentSharingController controller)
Shares sound data from sound annotation as a wave (".wav") file.
static void shareText(Context context, String text)
Share simple text to other apps.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public DocumentSharingManager ()

Public Methods

public static DocumentSharingController shareBitmap (Bitmap bitmap, 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.

public static DocumentSharingController shareBitmap (Context context, Bitmap bitmap, 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.

public static DocumentSharingController shareDocument (Context context, PdfDocument document, 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.

public static DocumentSharingController shareDocument (DocumentSharingController controller, PdfDocument document, 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. Works only when license allows creating new documents.
Returns
  • Sharing controller that can be used to cancel the sharing process.

public static DocumentSharingController shareDocument (Context context, PdfDocument document, ShareTarget shareTarget, 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. Works only when license allows creating new documents.
Returns
  • Sharing controller that can be used to cancel the sharing process.

public static DocumentSharingController shareDocument (Context context, PdfDocument document, ShareAction shareAction, 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
document Document to share.
shareAction Share action that will get executed.
shareOptions Options used to configure PdfProcessor task that will get performed before sharing. Works only when license allows creating new documents.
Returns
  • Sharing controller that can be used to cancel the sharing process.

public static DocumentSharingController shareDocument (Context context, PdfDocument document, 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.

public static DocumentSharingController shareDocument (DocumentSharingController controller, 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.

public static DocumentSharingController shareEmbeddedFile (EmbeddedFile embeddedFile, DocumentSharingController controller)

Shares embedded 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.

public static DocumentSharingController shareEmbeddedFile (Context context, EmbeddedFile embeddedFile, 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.

public static DocumentSharingController shareSoundAnnotation (SoundAnnotation soundAnnotation, 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.

public static void shareText (Context context, String text)

Share simple text to other apps.

Parameters
context Context of the calling component.
text Text to be shared to other apps.