Android SDK
Add the Jetpack Compose SDK via JitPack, register screens and targets, and add the launcher.
Requires Android 7.0+ (API 24) and Kotlin with Jetpack Compose. In mixed XML/Compose apps, the modifiers work in any composable regardless of how it’s hosted.
1. Add the dependency
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("https://jitpack.io") }
}
}Sync Gradle afterwards.
2. Configure the SDK
Configure in your Application subclass, forward deep links from your main activity, and register the Inspector deep link in the manifest.
import android.app.Application
import com.lovelysomething.tooltiptour.TooltipTour
class MyApp : Application() {
override fun onCreate() {
super.onCreate()
TooltipTour.configure(
this,
siteKey = "sk_xxxxxxxxxx",
baseURL = "https://app.lovelysomething.com"
)
}
}3. Register screens and targets
import com.lovelysomething.tooltiptour.registry.ttPage
import com.lovelysomething.tooltiptour.registry.ttTarget
@Composable
fun HomeScreen() {
Column(
modifier = Modifier
.fillMaxSize()
.ttPage("home") // ← this screen
) {
Text("Welcome back", modifier = Modifier.ttTarget("welcomeTitle"))
Button(onClick = { }, modifier = Modifier.ttTarget("getStartedButton")) {
Text("Get started")
}
}
}4. Add the launcher once, at the root
import com.lovelysomething.tooltiptour.ui.TTLauncherView
Box(modifier = Modifier.fillMaxSize()) {
ContentView() // your NavHost / Scaffold
TTLauncherView() // one instance handles every screen
}5. Build a tour and test
Create a walkthrough with Screen home, add steps, run the app and tap the launcher.
Scrollable screens
Targets already on screen need no setup. For targets that may be scrolled away:
import com.lovelysomething.tooltiptour.ui.ttScrollableColumn
val scrollState = rememberScrollState()
Column(
modifier = Modifier
.fillMaxSize()
.ttPage("home")
.ttScrollableColumn(scrollState) // ← before verticalScroll
.verticalScroll(scrollState)
) { /* ... */ }| Layout | Scroll-to-step |
|---|---|
Column + verticalScroll | ✓ use ttScrollableColumn |
LazyColumn | ✓ use ttScrollable + indexMap (keep the map in sync with your data) |
| Items already on screen | ✓ automatic |
LazyRow | ✗ not supported yet |
LazyVerticalGrid | ✗ not supported yet |
| Nested scroll containers | Only the outermost is handled |
Multi-activity apps
Configure once in your Application. The SDK follows the foreground activity automatically. Put the deep-link intent-filter on whichever activity should handle the Inspector — usually your main entry point.