Package com.pspdfkit.document.sharing
Class DefaultDocumentSharingController
-
- All Implemented Interfaces:
public class DefaultDocumentSharingController extends DocumentSharingController
Default implementation of DocumentSharingController.
-
-
Field Summary
Fields Modifier and Type Field Description public final ShareAction
shareAction
public final ShareTarget
shareTarget
-
Constructor Summary
Constructors Constructor Description DefaultDocumentSharingController(Context context)
Creates a default document controller to handle the document sharing process. DefaultDocumentSharingController(Context context, ShareAction shareAction)
Creates a default document controller to handle the document sharing process. DefaultDocumentSharingController(Context context, ShareTarget shareTarget)
Creates a default document controller to handle the document sharing process.
-
Method Summary
Modifier and Type Method Description ShareAction
getShareAction()
Returns share action handled by this controller. ShareTarget
getShareTarget()
Returns share target that this controller is sharing to. void
onSharingStarted(@NonNull() Disposable shareDocumentDisposable)
Called when DocumentSharingManager starts processing document for sharing. void
onSharingFinished(@NonNull() Uri shareUri)
Called when shared document is prepared. void
onSharingError()
Called when error occurred during document preparation for sharing. void
onSharingProgress(@NonNull() PdfProcessor.ProcessorProgress processorProgress)
Called when processing progress has been updated. void
cancelSharing()
Cancels sharing process. void
onDetach()
Called when the controller is no longer attached to its activity (i.e. -
-
Constructor Detail
-
DefaultDocumentSharingController
DefaultDocumentSharingController(Context context)
Creates a default document controller to handle the document sharing process.- Parameters:
context
- Activity context.
-
DefaultDocumentSharingController
DefaultDocumentSharingController(Context context, ShareAction shareAction)
Creates a default document controller to handle the document sharing process.- Parameters:
context
- Activity context.shareAction
- Share action handled by this controller.
-
DefaultDocumentSharingController
DefaultDocumentSharingController(Context context, ShareTarget shareTarget)
Creates a default document controller to handle the document sharing process.- Parameters:
context
- Activity context.shareTarget
- Target of the share action.
-
-
Method Detail
-
getShareAction
@NonNull() ShareAction getShareAction()
Returns share action handled by this controller.
- Returns:
Share action handled by this controller.
-
getShareTarget
@Nullable() ShareTarget getShareTarget()
Returns share target that this controller is sharing to.
- Returns:
Target of the share or null if no target is specified.
-
onSharingStarted
void onSharingStarted(@NonNull() Disposable shareDocumentDisposable)
Called when DocumentSharingManager starts processing document for sharing.
-
onSharingFinished
void onSharingFinished(@NonNull() Uri shareUri)
Called when shared document is prepared.
- Parameters:
shareUri
- Shared document Uri.
-
onSharingError
void onSharingError()
Called when error occurred during document preparation for sharing.
-
onSharingProgress
void onSharingProgress(@NonNull() PdfProcessor.ProcessorProgress processorProgress)
Called when processing progress has been updated.
-
cancelSharing
void cancelSharing()
Cancels sharing process.
-
onDetach
void onDetach()
Called when the controller is no longer attached to its activity (i.e. during configuration change).
-
-
-
-