Docs
grovs.io Start for free

Quick start

Install and configure the Grovs Android SDK in your app.

Install the SDK, configure it in your Application class and open your first link on a device. Takes about ten minutes.

Using an AI coding agent?

Copy one prompt into Claude Code, Cursor or Copilot and it does these steps in your project.

Open in Cursor

Upgrading? See 3.0 to 3.1 or 1.x to 3.0.

Requirements

Installation

Add the dependency to your app-level build.gradle. It's published on Maven Central.

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

Configuration

1. Initialize the SDK

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
        Grovs.identifier = "user_id_from_your_app"
        Grovs.attributes = mapOf("name" to "John Doe", "plan" to "premium")
    }
}

Configuration options

configure has four overloads. Each adds one parameter and requires all earlier ones:

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. Shorter overloads behave as if autoTrackScreenViews = true, clipboardDomains = null and enabled = true.

ParameterDefaultDescription
applicationRequiredYour Application instance.
apiKeyRequiredProject API key from the Grovs dashboard.
useTestEnvironmentRequiredtrue targets the test environment (its own domain, links and data). false targets production. Use true only in development builds.
baseURLGrovs cloudDomain of a self-hosted backend, for example "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 this launch. Pass your stored consent value; it isn't persisted. See Privacy & Consent.

To set a later parameter, pass every earlier one, by name or position:

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

identifier, attributes and pushToken can be set before or after configure. Values set earlier are kept and sent once the SDK authenticates.

Calling configure again replaces the previous configuration. Shorter overloads reset enabled to true, so a setSDK(false) before configure doesn't carry over. Pass consent through configure instead.

2. Forward lifecycle events

In your launcher activity, forward onStart and onNewIntent so the SDK 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 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 declares the INTERNET and ACCESS_NETWORK_STATE permissions itself. It doesn't declare POST_NOTIFICATIONS; see Push notifications.

Next steps

See also

Last updated 2026-10-27
Was this page helpful?