Class SimpleInstantDocumentListener

    • Constructor Detail

      • SimpleInstantDocumentListener

        SimpleInstantDocumentListener()
    • Method Detail

      • onAuthenticationFinished

         void onAuthenticationFinished(@NonNull() InstantPdfDocument instantDocument, @NonNull() String validJwt)

        Called when authentication with Instant Server (PSPDFKit Document Engine) has successfully finished.

        Parameters:
        instantDocument - Document that we were authenticating for.
        validJwt - JWT that was used for this authentication request.
      • onSyncStarted

         void onSyncStarted(@NonNull() InstantPdfDocument instantDocument)

        Called when annotation sync has been started.

        Parameters:
        instantDocument - Document that is syncing the annotations.
      • onSyncFinished

         void onSyncFinished(@NonNull() InstantPdfDocument instantDocument)

        Called when annotation sync has been finished successfully.

        Parameters:
        instantDocument - Document that was syncing the annotations.
      • onDocumentCorrupted

         void onDocumentCorrupted(@NonNull() InstantPdfDocument instantDocument)

        Called when InstantPdfDocument has detected data corruption.

        Receiving this callback means any further interaction with the sender’s document are destined to fail. You can copy the document package aside for forensic purposes, but you will — eventually — have to purge its storage, and download it anew.

        Because this situation means the document has become unusable, it will invalidate itself immediately after this method returns.

        Parameters:
        instantDocument - Document that has detected data corruption.