Skip to main content
This guide explains how to add the Fexco DCC API library to your Android payment application and connect it to the DCC Container App. After you complete the setup, your application can call the IRemoteDCCService interface to check DCC eligibility, request the cardholder choice screen, and record transaction results.

Before you start

To complete this setup, you need the following:
  • Android 9 or later on the target device. The app has been tested on Android versions 9 through 14.
  • The DCC Container App installed on the device. Contact Fexco to obtain the download.
  • The dccPublicApi and dcc-aidl library files (.aar format), provided by Fexco on request.
The following four steps add the library files to your project, configure the dependencies, create the service instance, and initialize the SDK.
1

Add the library files

Copy the dccPublicApi and dcc-aidl library files provided by Fexco into your project’s app/libs/ directory. The filenames follow this pattern, where X.Y.Z is the version number on the files you received:
2

Configure the build.gradle file

In your application module’s build.gradle file, add both library files as dependencies. Replace X.Y.Z with the version number on the files you received from Fexco:
3

Create the service instance

In the class that handles your payment flow, create an instance of IRemoteDCCServiceImpl by providing the following:
  • Your application context
  • The DCC app package name: com.fexco.pos.dcc.app
  • The service action name: com.fexco.pos.dcc.app.DccCommunicationService
4

Initialize the SDK

In the same class, call init() with the DHS base URL before calling any other method. See Environments for the correct URL for your environment.
onSuccess is called when the SDK initializes correctly. If onFailure is called, check that the DHS base URL is correct for your environment and that the device has network connectivity.
When onSuccess is called, the DCC library is fully integrated and initialized. Your payment application can now call IRemoteDCCService methods to check DCC eligibility, request the cardholder choice screen, and record transaction results. See DCC service methods for the full method reference.

Next steps

With the library integrated, the following pages will help you build out the DCC transaction flow.
  • DCC service methods: reference for all methods available through the IRemoteDCCService interface.
  • Environments: base URLs for all DCC environments to pass to init().