Getting Started

Getting Started

Install

commonMain.dependencies {
    implementation("io.github.androidpoet:halo:0.1.0")
    implementation("io.github.androidpoet:halo-compose:0.1.0")
}

halo ships the API and the platform managers. halo-compose adds rememberLiveActivityManager() for Compose Multiplatform.

Get a manager

@Composable
fun FocusScreen() {
    val liveActivities = rememberLiveActivityManager()
    // ...
}

Without Compose, construct the platform manager directly: AndroidLiveActivityManager(context) on Android, IosLiveActivityManager() on iOS, UnsupportedLiveActivityManager() elsewhere.

Finish the platform setup

  • Android: request POST_NOTIFICATIONS on API 33+, optionally configure icons.
  • iOS: add the Swift package, a widget extension and the bridge file.

Then follow Usage.