Setup

Add gptdriver Android library to your dependencies. (Maven Centralarrow-up-right)

build.gradle.kts
dependencies {
    // ...
    implementation("io.mobileboost.gptdriver:gptdriver-lib:1.3.2")
    // ...
}

Import the library in your java code

import io.mobileboost.gptdriver_lib.GptDriver;

If needed, add packaging exclude rules in the android section of the build.gradle.kts (:app) file

To resolve build failures caused by duplicate metadata files from dependencies, exclude them from the packaging process.

build.gradle.kts (:app)
android {
    // ...
    packaging {
        resources {
            excludes.addAll(listOf("META-INF/INDEX.LIST", "META-INF/io.netty.versions.properties"))
        }
    }
    // ...
}

If not already present, add internet permissions to the AndroidManifest.xml file

Last updated