Skip to content

cmp-intent-launcher-compose

cmp-intent-launcher-compose

Compose Multiplatform extensions for cmp-intent-launcher — provides @Composable rememberIntentLauncher().

Why this module exists

Extracted from cmp-intent-launcher during inter-app-comms-real-native-impls Phase 1 (2026-05-28). The Compose Compiler Gradle plugin is module-level and requires compose.runtime on the classpath for every target — that blocked the core module from reaching tvOS/watchOS/Linux/mingw. The split: - cmp-intent-launcher (core, Compose-free) — 19 KMP targets - cmp-intent-launcher-compose (this module, Compose-bearing) — 9 targets

Targets (9 — Compose-MP supported)

Target Status
androidLibrary
jvm (Desktop)
iosX64 / iosArm64 / iosSimulatorArm64
macosX64 / macosArm64
js (browser)
wasmJs (browser)

Coordinates

implementation("io.github.mobilebytelabs:cmp-intent-launcher:<version>")
implementation("io.github.mobilebytelabs:cmp-intent-launcher-compose:<version>")

Usage

import com.mobilebytelabs.kmptoolkit.intentlauncher.ResultContracts
import com.mobilebytelabs.kmptoolkit.intentlauncher.compose.rememberIntentLauncher

@Composable
fun PickImageScreen() {
    val launcher = rememberIntentLauncher()
    val scope = rememberCoroutineScope()
    Button(onClick = {
        scope.launch {
            val result = launcher.launch {
                result(ResultContracts.PickImage)
                type("image/*")
            }
            // handle result
        }
    }) { Text("Pick an image") }
}

Migration from v0.2

- implementation("io.github.mobilebytelabs:cmp-intent-launcher:<v0.2>")
+ implementation("io.github.mobilebytelabs:cmp-intent-launcher:<v0.3>")
+ implementation("io.github.mobilebytelabs:cmp-intent-launcher-compose:<v0.3>")

- import com.mobilebytelabs.kmptoolkit.intentlauncher.rememberIntentLauncher
+ import com.mobilebytelabs.kmptoolkit.intentlauncher.compose.rememberIntentLauncher

No call-site changes needed beyond the import path. All other APIs (IntentBuilder, ResultContracts, IntentResult, IntentError, IntentLauncher) stay in the core module under com.mobilebytelabs.kmptoolkit.intentlauncher.*.

Non-Compose alternative

For non-Compose Android: use ComponentActivity.intentLauncher() extension from the core module (com.mobilebytelabs.kmptoolkit.intentlauncher.intentLauncher).

Module reference

Module Identity (auto-gen)

Artifact Package Current version Maven Since API tier
io.github.mobilebytelabs:cmp-intent-launcher-compose com.mobilebytelabs.kmptoolkit.intent.launcher.compose UNKNOWN Central 2026-05-30 experimental

Module purpose (one paragraph):


§2 Per-Platform Parity Matrix (auto-gen)

Target Source-set present Real impl UnsupportedPlatform stub .kt count Last reviewed Coverage Notes
androidMain ✅ real 0 1 2026-06-01 (legacy:full)
iosMain ✅ real 0 1 2026-06-01 (legacy:full)
macosMain ✅ real 0 1 2026-06-01 (legacy:full)
jvmMain ✅ real 0 1 2026-06-01 (legacy:full)
jsMain ✅ real 0 1 2026-06-01 (legacy:full)
wasmJsMain ✅ real 0 1 2026-06-01 (legacy:full)

Legend (Real impl): ✅ real impl, 🟡 partial / wontfix-OS / wontfix-infra / legacy stub, ⛔ not declared, — N/A. Legend (Coverage enum, since 2026-06-01): full (all public-API methods backed by OS primitive) · partial (most real; some typed UnsupportedPlatform fallbacks for contracts that don't apply) · wontfix-OS (OS lacks the primitive) · wontfix-infra (impl possible but CI/toolchain blocks it) · (legacy:full|stub) (auto-derived; pre-opt-in modules — add a // LD-2-coverage: {enum} comment to the platform's primary .kt file to graduate). See RULE-LIB-DEVELOPMENT-MD-001 LD-2 + ADRs for accepted wontfix cases.


API reference

Each release ships the module's full Dokka HTML site inside its -javadoc.jar artifact on Maven Central.

In IntelliJ / Android Studio the IDE mounts the jar and surfaces it automatically in hover popups, Quick Documentation, and Symbol search.