-
- All Implemented Interfaces:
-
net.gini.android.capture.logging.ErrorLoggerListener,net.gini.android.capture.network.GiniCaptureNetworkService
public final class GiniCaptureDefaultNetworkService implements GiniCaptureNetworkServiceDefault implementation of the network related tasks required by the Gini Capture SDK.
Relies on the Gini Bank API Library for executing the requests, which implements communication with the Gini Bank API using generated anonymous Gini users.
Important: Access to the Gini User Center API is required which is restricted to selected clients only. Contact Gini if you require access.
To create an instance use the GiniCaptureDefaultNetworkService.Builder returned by the builder method.
In order for the Gini Capture SDK to use this implementation pass an instance of it to GiniCapture.Builder.setGiniCaptureNetworkService when creating a GiniCapture instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classGiniCaptureDefaultNetworkService.BuilderBuilder for configuring a new instance of the GiniCaptureDefaultNetworkService.
public classGiniCaptureDefaultNetworkService.Companion
-
Field Summary
Fields Modifier and Type Field Description private final DocumentanalyzedGiniApiDocument
-
Constructor Summary
Constructors Constructor Description GiniCaptureDefaultNetworkService(GiniBankAPI giniBankApi, DocumentMetadata documentMetadata, CoroutineContext coroutineContext)
-
Method Summary
Modifier and Type Method Description final DocumentgetAnalyzedGiniApiDocument()Contains the document which was created when the user uploaded an image or a pdf for analysis. CancellationTokenupload(Document document, GiniCaptureNetworkCallback<Result, Error> callback)CancellationTokendelete(String giniApiDocumentId, GiniCaptureNetworkCallback<Result, Error> callback)CancellationTokenanalyze(LinkedHashMap<String, Integer> giniApiDocumentIdRotationMap, GiniCaptureNetworkCallback<AnalysisResult, Error> callback)UnitsendFeedback(Map<String, GiniCaptureSpecificExtraction> extractions, Map<String, GiniCaptureCompoundExtraction> compoundExtractions, GiniCaptureNetworkCallback<Void, Error> callback)UnitdeleteGiniUserCredentials()UnithandleErrorLog(ErrorLog errorLog)Unitcleanup()-
-
Constructor Detail
-
GiniCaptureDefaultNetworkService
GiniCaptureDefaultNetworkService(GiniBankAPI giniBankApi, DocumentMetadata documentMetadata, CoroutineContext coroutineContext)
-
-
Method Detail
-
getAnalyzedGiniApiDocument
final Document getAnalyzedGiniApiDocument()
Contains the document which was created when the user uploaded an image or a pdf for analysis.
It is
nullwhen extractions were retrieved without using the Gini Bank API. For example when the extractions came from an EPS QR code.You should call this method only after the Gini Capture SDK returned the extraction results and before you call GiniCaptureDefaultNetworkService.cleanup or GiniCapture.cleanup.
-
upload
CancellationToken upload(Document document, GiniCaptureNetworkCallback<Result, Error> callback)
-
delete
CancellationToken delete(String giniApiDocumentId, GiniCaptureNetworkCallback<Result, Error> callback)
-
analyze
CancellationToken analyze(LinkedHashMap<String, Integer> giniApiDocumentIdRotationMap, GiniCaptureNetworkCallback<AnalysisResult, Error> callback)
-
sendFeedback
Unit sendFeedback(Map<String, GiniCaptureSpecificExtraction> extractions, Map<String, GiniCaptureCompoundExtraction> compoundExtractions, GiniCaptureNetworkCallback<Void, Error> callback)
-
deleteGiniUserCredentials
Unit deleteGiniUserCredentials()
-
handleErrorLog
Unit handleErrorLog(ErrorLog errorLog)
-
-
-
-