Kylok

object Kylok

Experimental device agent. Components initialize without opening the host Activity.

Properties

Link copied to clipboard

Wire identity for paired SDKs; matching this alone does not guarantee development compatibility.

Link copied to clipboard

SDK identity is independent of the Android host's application version.

Functions

Link copied to clipboard
fun configure(context: Context, options: HostOptions)

Configure scheduling before the first component/worker starts; equal repeats are idempotent. Different options after work starts throw IllegalStateException. Options are process-local; call this in Application.onCreate on every start. Listeners own their returned registration; WorkManager owns scheduled workers and hosts must not shut down SDK executors. Usage: Kylok.configure(this, HostOptions(syncIntervalMinutes = 30)).

Link copied to clipboard

Open the first pending Android installation confirmation from a host user action. Usage: Kylok.confirmPendingInstall(activity) when a snapshot reports requiresUserAction.

Link copied to clipboard

Optional, read-only notifications after durable worker changes. Close the registration with the host lifecycle. Earlier events are not replayed. Usage: val registration = Kylok.observe(StatusListener { render(it) }); close on host stop.

Link copied to clipboard
fun retry(context: Context)

Schedule reconciliation without rotating credentials. Usage: Kylok.retry(context) from a refresh action.

Link copied to clipboard
fun snapshot(context: Context, receive: (AgentStatus) -> Unit)

Read one sanitized snapshot on a worker, delivered on the main thread. Usage: Kylok.snapshot(context) { status -> render(status) }.

Link copied to clipboard
fun status(context: Context, receive: (String) -> Unit)

Return formatted local diagnostics on the main thread; credentials and keys are excluded. Usage: Kylok.status(context) { textView.text = it }. Use snapshot for structured UI data.