GiniVisionNetworkService

public interface GiniVisionNetworkService

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

The easiest way to get started is to use the Gini Vision 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 API SDK.

In order for the Gini Vision Library to use your implementation pass an instance of it to setGiniVisionNetworkService when creating a GiniVision 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 Vision Library falls back to invoking those methods.

Functions

analyze
Link copied to clipboard
abstract CancellationToken analyze(@NonNull() LinkedHashMap<String, Integer> giniApiDocumentIdRotationMap, @NonNull() GiniVisionNetworkCallback<AnalysisResult, Error> callback)
Called when a document needs to be analyzed by the Gini API.
cleanup
Link copied to clipboard
abstract void cleanup()
Called when the Gini Vision Library is not needed anymore and the cleanup method has been called.
delete
Link copied to clipboard
abstract CancellationToken delete(@NonNull() String giniApiDocumentId, @NonNull() GiniVisionNetworkCallback<Result, Error> callback)
Called when a document needs to be deleted from the Gini API.
upload
Link copied to clipboard
abstract CancellationToken upload(@NonNull() Document document, @NonNull() GiniVisionNetworkCallback<Result, Error> callback)
Called when a document needs to be uploaded to the Gini API.