Package 

Interface Document

  • All Implemented Interfaces:
    android.os.Parcelable

    
    public interface Document
     implements Parcelable
                        

    This class is the container for transferring documents between the client application and the Gini Capture SDK and between the Fragments of the Gini Capture SDK.

    Due to the size limitations of the android.os.Bundle, the document data byte array has to be stored in a memory cache when parceling and read from the cache when unparceling.

    Warning: Always retrieve the Document extras from a Bundle to force unparceling and removing of the reference to the byte array from the memory cache. Failing to do so will lead to memory leaks.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public enum Document.Type

      Supported document types.

      public enum Document.ImportMethod

      Enum of supported methods for importing documents.

      public class Document.Source

      Source of the document (e.g. camera or external).

    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract String getId() Retrieve the document's unique id.
      abstract Document.Type getType() Get the concrete document type.
      abstract String getMimeType() Retrieve the document's mime type (media type).
      abstract Array<byte> getData() The contents of a document, if the document was loaded into memory.
      abstract Intent getIntent() The Intent with which the imported document was received.
      abstract Uri getUri() The Uri of the imported document.
      abstract boolean isImported() Document is imported if it was picked from another app from the Camera Screen's document upload button or if a file was passed to the Gini Capture SDK through the client application from another app.
      abstract Document.ImportMethod getImportMethod() Retrieve with which method the document has been imported.
      abstract Document.Source getSource() Retrieve from which source the document originates from.
      abstract boolean isReviewable() Documents like PDFs are not reviewable and can be passed directly to the Analysis Screen.
      • Methods inherited from class android.os.Parcelable

        describeContents, writeToParcel
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • getMimeType

         abstract String getMimeType()

        Retrieve the document's mime type (media type).

      • getData

        @Nullable() abstract Array<byte> getData()

        The contents of a document, if the document was loaded into memory.

        For photos captured with the camera or for QR Codes this is never null.

        If isImported is true then this might be null. If it's null you can use getIntent and access the contents using the Intent.

      • isImported

         abstract boolean isImported()

        Document is imported if it was picked from another app from the Camera Screen's document upload button or if a file was passed to the Gini Capture SDK through the client application from another app.

      • isReviewable

         abstract boolean isReviewable()

        Documents like PDFs are not reviewable and can be passed directly to the Analysis Screen. Reviewable documents have to be shown in the Review Screen first before passing it on to the Analysis Screen.