Android SDK

The Ours Privacy Android SDK brings privacy-first analytics and consent management to your Android applications. It delivers a comprehensive feature set for event tracking, user profiles, and compliance without compromising performance.

Key features include:

  • Event Tracking (track): Record custom events with optional properties.
  • User Identification (identify): Associate events with a specific user ID.
  • Lifecycle Tracking: Automatically capture app start, background, and resume events.

This integration is coming soon. Read the information below to learn more about how it will work.

Installation

Add the dependency to your app's build.gradle:

dependencies {
    implementation 'com.oursprivacy:android-sdk:1.0.0'
}

Initialization

import com.oursprivacy.OurPrivacy

class YourApplication : Application() {
    override fun onCreate() {
        super.onCreate()
        OurPrivacy.initialize("YOUR_PROJECT_API_KEY")
    }
}

Basic Usage

// Identify a user
OurPrivacy.identify("user_12345")

// Track an event with properties
OurPrivacy.track("Item Purchased", mapOf(
    "item_id" to "sku-001",
    "price" to 19.99
))

// Time an event
OurPrivacy.timeEvent("Image Upload")
// ... later ...
OurPrivacy.track("Image Upload")

Compatibility

  • Android API 21+ (Android 5.0 Lollipop and above)
  • Kotlin 1.5+
  • Gradle 7.0+

Getting Help

For support or questions, visit our documentation site or reach out to your account representative.