Docs

Quick Start

Install and configure the Grovs Android SDK in your app

Upgrading from 1.x? See the 3.0 upgrade guide.

Requirements

Installation

Add the Grovs dependency to your app-level build.gradle:

Groovy
dependencies {
    implementation("io.grovs:Grovs:3.0.0")
}

The artifact is published on Maven Central.

Configuration

1. Initialize the SDK

Configure Grovs in your Application class:

Kotlin
import io.grovs.Grovs
import io.grovs.model.LogLevel
 
class MyApplication : Application() {
    override fun onCreate() {
        super.onCreate()
 
        // Optional: verbose logging while integrating
        Grovs.setDebug(LogLevel.INFO)
 
        Grovs.configure(this, "your-api-key", useTestEnvironment = false)
 
        // Optional: identify the user (after configure)
        Grovs.identifier = "user_id_from_your_app"
        Grovs.attributes = mapOf("name" to "John Doe", "plan" to "premium")
    }
}

Configuration options

configure has four overloads. Each longer one adds a parameter and requires every earlier one:

Kotlin
Grovs.configure(application, apiKey, useTestEnvironment, baseURL = null)
Grovs.configure(application, apiKey, useTestEnvironment, baseURL, autoTrackScreenViews)
Grovs.configure(application, apiKey, useTestEnvironment, baseURL, autoTrackScreenViews, clipboardDomains)
Grovs.configure(application, apiKey, useTestEnvironment, baseURL, autoTrackScreenViews, clipboardDomains, enabled)

Only baseURL has a default. The shorter overloads behave as if autoTrackScreenViews = true, clipboardDomains = null, and enabled = true.

ParameterDefaultDescription
application—Your Application instance.
apiKey—Your project API key from the Grovs dashboard.
useTestEnvironment—true targets your project's test environment (its own domain, links, and data); false targets production. Use true only in development builds.
baseURLGrovs cloudDomain of a self-hosted backend, e.g. "https://sdk.example.com". The SDK appends the API path.
autoTrackScreenViewstrueTrack Activity and Fragment screen views automatically. See Events & Screen Tracking.
clipboardDomainsnoneExtra link hosts accepted by clipboard-assisted deferred deep linking. Grovs-owned hosts are always accepted.
enabledtrueWhether the SDK may collect and send anything on this launch. Pass your stored consent value — it is not persisted. See Privacy & Consent.

There are no defaults past baseURL, so to set a later parameter pass every earlier one, by name or by position:

Kotlin
Grovs.configure(
    this,
    "your-api-key",
    useTestEnvironment = false,
    baseURL = null,
    autoTrackScreenViews = false,
    clipboardDomains = listOf("links.yourdomain.com"),
    enabled = hasConsent
)

Calling configure again replaces the previous configuration. The shorter overloads reset enabled to true, so a setSDK(false) made before configure does not carry over — pass consent through configure instead.

2. Forward lifecycle events

In your launcher activity, forward onStart and onNewIntent to the SDK so it can resolve incoming links:

Kotlin
class MainActivity : AppCompatActivity() {
    override fun onStart() {
        super.onStart()
        Grovs.onStart(this)
    }
 
    override fun onNewIntent(intent: Intent?) {
        super.onNewIntent(intent)
        Grovs.onNewIntent(intent, this)
    }
}

3. Add intent filters

Add these intent filters to your launcher activity in AndroidManifest.xml:

XML
<!-- Custom URL scheme -->
<intent-filter>
    <data android:scheme="your_app_scheme" android:host="open" />
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
 
<!-- App links (production) -->
<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="https" android:host="your_app_host" />
</intent-filter>
 
<!-- App links (test) -->
<intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data android:scheme="https" android:host="your_app_test_host" />
</intent-filter>

The SDK itself declares the INTERNET and ACCESS_NETWORK_STATE permissions; you do not need to add them.

Next steps

See also

Edit this page on GitHubLast updated 2026-10-07