Getnet DocsGetnet Docs

Add the SDK to Your Project

This guide sets up the SDK White Label in an Android project: the permission, the Gradle JDK, the required terminal services, and the SDK dependency.

Before you begin

Confirm you meet the Prerequisites. This delivery provides the homologation (HML) material, used by the debug build type.

Step 1: Add the Android permission

Add the internet permission to your AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

The SDK uses it to communicate with the payment services.

Step 2: Set the Gradle JDK to 21

The project compiles only with JDK 21. In Android Studio:

  1. Open Settings → Build, Execution, Deployment → Build Tools → Gradle.
  2. Under Gradle JDK, select a JDK 21 — for example, the bundled JetBrains Runtime 21 (jbr-21).
  3. Click Apply and run Gradle Sync again.

The sync completes without the Unsupported class file major version error.

Step 3: Install the required terminal services

The SDK depends on two services installed on the terminal, delivered as APKs in the toolkit’s apks/ folder. First, check whether they are already installed — on the terminal, open Settings → Apps and look for both, or use adb:

adb shell pm list packages | Select-String "com.pagonxt.hal.platform|com.getnet.posdigital.service"

If both are present, skip to Step 4. Otherwise, enable USB debugging on the terminal, connect it, and install the Platform for your manufacturer plus the common Middleware:

## Platform — choose the APK for your terminal's manufacturer
adb install "apks\gertec\gertec-platform-1.1.4-release.apk"
adb install "apks\positivo\positivo-platform-1.0.59-release.apk"

## Middleware — common to all terminals
adb install "apks\common\middleware-4.0.0-release.apk"

Step 4: Add the Maven repository

The SDK is distributed as a local Maven repository. Point maven { url } to the hml folder, which the debug build type resolves. Use an absolute path.

settings.gradle.kts (Kotlin DSL):

dependencyResolutionManagement {
    repositories {
        // ...
        maven { url = uri(".../apolo-sdk/hml") } // used by the debug build type
    }
}

Step 5: Declare the dependency

Declare the HML material with debugImplementation:

dependencies {
    // ...
    debugImplementation("com.pagonxt.sdk:brazil-hml:1.0.0-SNAPSHOT") // debug → HML
}

The coordinate com.pagonxt.sdk:brazil-hml:1.0.0-SNAPSHOT resolves from the local Maven repository.

Next steps

  • Quick Start — initialize the SDK and run your first sale.