GiniCaptureNetworkService

Interface specifying network related tasks required by the Gini Capture SDK in order to communicate with the Gini API.

The easiest way to get started is to use the Gini Capture Network Library package which provides a default implementation.

You can also create your own implementation and communicate directly with the Gini API or pass requests through your backend. For direct communication with the Gini API we recommend using the Gini Pay API lib.

In order for the Gini Capture SDK to use your implementation pass an instance of it to setGiniCaptureNetworkService when creating a GiniCapture instance.

When an instance of this interface is available document analysis related methods in the CameraFragmentListener , ReviewFragmentListener and the won't be invoked. Otherwise the Gini Capture SDK falls back to invoking those methods.

public interface GiniCaptureNetworkService

Functions

analyze
Link copied to clipboard

Called when a document needs to be analyzed by the Gini API.

The documents were already uploaded and only the Gini API document ids of documents are passed in along with the user applied document rotations.

cleanup
Link copied to clipboard

Called when the Gini Capture SDK is not needed anymore and the method has been called.

Free up any resources your implementation is using.

abstract void cleanup()
delete
Link copied to clipboard

Called when a document needs to be deleted from the Gini API.

abstract CancellationToken delete(String giniApiDocumentId, GiniCaptureNetworkCallback<Result, Errorcallback)
upload
Link copied to clipboard

Called when a document needs to be uploaded to the Gini API.

You should only upload the document. Polling or retrieving extractions is not needed at this point.

abstract CancellationToken upload(Document document, GiniCaptureNetworkCallback<Result, Errorcallback)