Document

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.

public interface Document implements Parcelable

Types

ImportMethod
Link copied to clipboard

Enum of supported methods for importing documents.

enum ImportMethod
Source
Link copied to clipboard

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

class Source implements Parcelable
Type
Link copied to clipboard

Supported document types.

enum Type

Functions

describeContents
Link copied to clipboard
abstract int describeContents()
getData
Link copied to clipboard

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 {@code true} then this might be null. If it's null you can use getIntent and access the contents using the Intent.

abstract Array<byte> getData()
getId
Link copied to clipboard

Retrieve the document's unique id.

abstract String getId()
getImportMethod
Link copied to clipboard

Retrieve with which method the document has been imported.

abstract Document.ImportMethod getImportMethod()
getIntent
Link copied to clipboard

The Intent with which the imported document was received.

abstract Intent getIntent()
getMimeType
Link copied to clipboard

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

abstract String getMimeType()
getSource
Link copied to clipboard

Retrieve from which source the document originates from.

abstract Document.Source getSource()
getType
Link copied to clipboard

Get the concrete document type.

abstract Document.Type getType()
getUri
Link copied to clipboard

The Uri of the imported document.

abstract Uri getUri()
isImported
Link copied to clipboard

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 boolean isImported()
isReviewable
Link copied to clipboard

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.

abstract boolean isReviewable()
writeToParcel
Link copied to clipboard
abstract void writeToParcel(Parcel p, int p1)

Inheritors

GiniCaptureDocument
Link copied to clipboard