Device Fingerprint
MOBILE

Android

Resources and Overview

The Geelab Android SDK is intended for developers integrating native Android applications.

ItemDescription
ProductGeelab Device Fingerprint
Latest versionv2.7.5
Latest release dateSeptember 9, 2026
Main capabilitiesCollects more than 300 weak device attributes and uses relationship graphs and a three-dimensional validation model to identify virtualized, automated, and customized devices, returning real-time risk signals and status information.

Environment and Requirements

ItemRequirement
Target platformAndroid 5.0+ (minSdk 21)
Development environmentAndroid Studio 2026.1.2 (AGP 8+)
Build toolGradle. For Ant builds, extract the JAR and resource files from the package.
System dependenciesNone
Third-party SDK dependenciesNone

Installation

Obtain the SDK

Contact your account manager to obtain the SDK.

Import the SDK

Extract the .aar file (for example, geelabguard_android_vx.y.z_date.aar) from the ZIP package and place it in the project's libs directory. Confirm that it has been added as a library, then add this repository configuration to build.gradle:

repositories {
    flatDir {
        dirs 'libs'
    }
}

Add the AAR as a dependency:

implementation(name: 'geelabguard_android_vx.y.z_date', ext: 'aar')

Declare Permissions

<!-- Required; the default value is apply. -->
<uses-permission android:name="android.permission.INTERNET" />

Configure Obfuscation Rules

The Geelab SDK is already obfuscated. Add these rules and do not obfuscate it again:

-dontwarn tech.geelab.core.**
-keep class tech.geelab.core.**{*;}

Integration flow

  1. Register an application in the dashboard and obtain its AppID.
  2. Use the AppID to obtain a GeelabGuardReceipt.

Code Examples

The following integration applies to SDK version 2.3.0 and later.

Register the AppID at application startup and configure the service Region

The submitServerUrl must match the Region configured for the application in the console.

RegionsubmitServerUrl
Globalhttps://riskct-global.geelabapi.com/api/v2/client_report
Europehttps://riskct-eu.geelabapi.com/api/v2/client_report
North Americahttps://riskct-na.geelabapi.com/api/v2/client_report
// Public API Key obtained from the console
const val appId = "123456789012345678901234567890ab"

// The Global endpoint is preconfigured by the SDK.
const val submitServerUrl = "https://riskct-global.geelabapi.com/api/v2/client_report"
// Europe:
// const val submitServerUrl = "https://riskct-eu.geelabapi.com/api/v2/client_report"
// North America:
// const val submitServerUrl = "https://riskct-na.geelabapi.com/api/v2/client_report"

class APP: Application() {
    override fun onCreate() {
        super.onCreate()
        // Register the AppID with the default Global service.
        GeelabGuard.register(this, appId)
        // For another Region:
        // GeelabGuard.register(this, appId, submitServerUrl)
    }
}

Obtain a GeeToken

Use the GeelabGuard SDK to sign the supplied context and obtain an environment-detection GeeToken.

// Obtain a local GeeToken and query it from your server.
fun getGeeToken(context: Context) {
    thread {
        val data = "Unique transaction ID or credential that binds the GeeToken to the business context."

        val receipt = GeelabGuard.fetchReceipt(context, data)
        if (receipt!= null) {
            // Submit it with the business data and query the final device intelligence result from your server.
            Log.i("GeeToken:", "${receipt.geeToken}")
        } else {
            Log.w("Unable to obtain GeelabGuardReceipt", "Verify that GeelabGuard.register(appId) was called.")
        }
    }
}

// Obtain respondedGeeToken asynchronously.
fun getRespondedGeeToken(context: Context) {
    val data = "Unique transaction ID or credential that binds the GeeToken to the business context."
    GeelabGuard.submitReceipt(context, data) { status, receipt ->
        when (status) {
            // The SDK submitted successfully. Query with respondedGeeToken.
            200 -> text.postValue("RespondedGeeToken: ${receipt.respondedGeeToken}")

            // Triggered only when appId or Context is empty.
            -200 -> text.value = "Invalid appId or Context is null"

            // Network or service response failure. Inspect receipt.originalResponse.
            // You can fall back to receipt.geeToken for the query.
            -300, -500, -501 -> {
                text.value = "${receipt.originalResponse}"
                Log.e("GeeLabGuard SubmitReceipt", receipt.geeToken)
            }
            else -> throw IllegalStateException("Unexpected error code")
        }
    }
}

Error Codes

The asynchronous GeelabGuard.submitReceipt(Context, String, GeelabGuard.CallbackHandler) method can return:

Error codeDescription
-200The AppID has not been registered. Register it during application startup.
-300Network error. See the error object's userInfo for details.
-500Invalid service response format. Inspect receipt.originalResponse.
-501Service response failure. Inspect receipt.originalResponse.

Query the GeeToken Result

Send respondedGeeToken or GeeToken with the business data to your backend. Your backend can then query the result from the Geelab Device Fingerprint service. For details, refer to the server-side integration documentation.