Class DocumentTaskManager.DocumentUploadBuilder

  • Enclosing class:
    DocumentTaskManager

    public static class DocumentTaskManager.DocumentUploadBuilder
    extends java.lang.Object
    A builder to configure the upload of a bitmap.
    • Constructor Detail

      • DocumentUploadBuilder

        public DocumentUploadBuilder()
      • DocumentUploadBuilder

        @Deprecated
        public DocumentUploadBuilder​(@NonNull
                                     android.graphics.Bitmap documentBitmap)
        Deprecated.
        Parameters:
        documentBitmap - A Bitmap representing the image.
    • Method Detail

      • setDocumentBytes

        public DocumentTaskManager.DocumentUploadBuilder setDocumentBytes​(@NonNull
                                                                          byte[] documentBytes)
        Set the document as a byte array. If a Bitmap was also set, the bitmap will be used.
      • setDocumentBitmap

        public DocumentTaskManager.DocumentUploadBuilder setDocumentBitmap​(@NonNull
                                                                           android.graphics.Bitmap documentBitmap)
        Set the document as a Bitmap. This bitmap will be used instead of the byte array, if both were set.
      • setDocumentType

        @Deprecated
        public DocumentTaskManager.DocumentUploadBuilder setDocumentType​(@NonNull
                                                                         java.lang.String documentType)
        Deprecated.
        Set the document's type. (This feature is called document type hint in the Gini API documentation). By providing the doctype, Gini’s document processing is optimized in many ways.
      • setCompressionRate

        @Deprecated
        public DocumentTaskManager.DocumentUploadBuilder setCompressionRate​(int compressionRate)
        Deprecated.
        The default compression rate is set to get the best extractions for the smallest image byte size.
        The bitmap (if set) will be converted into a JPEG representation. Set the compression rate for the JPEG representation.
      • upload

        public bolts.Task<Document> upload​(@NonNull
                                           DocumentTaskManager documentTaskManager)
        Use the given DocumentTaskManager instance to upload the document with all the features which were set with this builder.
        Parameters:
        documentTaskManager - The instance of a DocumentTaskManager whill will be used to upload the document.
        Returns:
        A task which will resolve to a Document instance.