Skip to Content

Installation

Use 1.1.0-beta.2 for controlled integration testing. Android API 21+ and Kotlin 1.9+ are required. The old 1.0.0 release predates the analytics and privacy fixes.

Add the SDK

In settings.gradle.kts:

dependencyResolutionManagement { repositories { google() mavenCentral() maven { url = uri("https://jitpack.io") content { includeGroup("com.github.AttributeHQ") } } } }

In the app module’s build.gradle.kts:

dependencies { implementation("com.github.AttributeHQ:android-sdk:1.1.0-beta.2") }

Initialize

Create an Android app in AttributeHQ with your package name. Use its dashboard UUID and a write-only SDK key. Never embed a dashboard credential or server conversion key.

import android.app.Application import com.attributehq.sdk.AttributeHQ import com.attributehq.sdk.AttributeHQConfiguration class MyApp : Application() { override fun onCreate() { super.onCreate() AttributeHQ.initialize(this, AttributeHQConfiguration( apiKey = "ak_your_write_only_sdk_key", appId = "your-dashboard-app-uuid" )) } }

Register .MyApp as android:name on your manifest’s application element. Leave debug logging off outside debugging.

Configuration

OptionTypeDefaultMeaning
apiKeyStringRequiredWrite-only SDK key
appIdStringRequiredDashboard app UUID
batchSizeInt10Events per batch; clamped to 1–100
flushIntervalSecondsLong5Flush interval; minimum 1 second
maxQueueSizeInt100Queue capacity; minimum 10
enableDebugLoggingBooleanfalseDiagnostic logging
requestTimeoutMsLong30000Network timeout; minimum 5000 ms
initialCollectionEnabledBoolean?nullPreserve saved choice; new installations default to enabled
initialAdvertisingSharingAdvertisingSharing?nullPreserve saved choice; new installations start unknown
enableSandboxEvidenceUploadBooleanfalseOpt in to sandbox permission observations
initialApplicationTrackingEnabledBoolean?nullPreserve app-level decision; new installations default to false

Explicit initial choices replace saved choices on every initialization. Avoid hardcoding an enabled choice if a user may have withdrawn it. See privacy controls.

Permissions and dependencies

The SDK manifest contributes android.permission.INTERNET and android.permission.ACCESS_NETWORK_STATE. It does not declare AD_ID or collect GAID/Android ID.

Gradle resolves Kotlin stdlib, Install Referrer 2.2, lifecycle-process 2.7.0 and core-ktx 1.12.0. Consumer ProGuard rules are included automatically.

Upgrade

Beta.1 app-scoped installation identity is retained. Older unscoped development storage is not migrated; upgrading from those builds creates a new installation identity without replaying their old queue. Test upgrades in an isolated app first.

Release notes  describe validation and remaining limits. Android partner delivery remains disabled.