Quick Start
Install and configure the Grovs Android SDK in your app
Installation
Add the Grovs dependency to your app-level build.gradle:
Groovy
dependencies {
implementation("io.grovs:Grovs:1.1.0")
}Configuration
1. Initialize the SDK
Initialize Grovs in your Application class:
Kotlin
class MyApplication : Application() {
override fun onCreate() {
super.onCreate()
Grovs.configure(this, "your-api-key")
}
}2. Handle incoming links
In your launcher activity, forward lifecycle events to the SDK:
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>
<!-- Universal 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>
<!-- Universal 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>