Package 

Class GiniCaptureDefaultNetworkService

  • All Implemented Interfaces:
    net.gini.android.capture.logging.ErrorLoggerListener , net.gini.android.capture.network.GiniCaptureNetworkService

    
    public final class GiniCaptureDefaultNetworkService
     implements GiniCaptureNetworkService
                        

    Default 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.

    • 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 null when 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)
      • sendFeedback

         Unit sendFeedback(Map<String, GiniCaptureSpecificExtraction> extractions, Map<String, GiniCaptureCompoundExtraction> compoundExtractions, GiniCaptureNetworkCallback<Void, Error> callback)