Skip to end of banner
Go to start of banner

Custom Implementation

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

The capture feature is unaware of any networking implementations and requires you to set them in the CaptureConfiguration. The networking related logic is abstracted behind the GiniCaptureNetworkService interface which is used to upload, analyze and delete documents. You can view the reference documentation for details.

You can provide your own networking by implementing the GiniCaptureNetworkService interface. Also, you can use Gini Bank API Library for Android or implement the communication with the Gini Bank API yourself.

You can see how you can configure the GiniBank to use an implementation of GiniCaptureNetworkService in the code snippet below. We are providing GiniCaptureDefaultNetworkService in this example, but you can provide your own implementation as well.

// initialise the GiniCaptureNetworkService implementation
val giniCaptureDefaultNetworkService = GiniCaptureDefaultNetworkService  
    .builder(context)  
    .setClientCredentials(  
        clientId,  
        clientSecret,  
        "example.com"  
    )  

// set the GiniCaptureNetworkService to the CaptureConfiguration
val captureConfiguration = CaptureConfiguration(
    networkService = giniCaptureDefaultNetworkService
)

// setup GiniBank to use CaptureConfiguration
GiniBank.setCaptureConfiguration(context, captureConfiguration)

  • No labels