OverlayController

class OverlayController(context: Context)

Programmatic floating-overlay primitive. Host apps wire this to a settings toggle; no LLM tools expose it directly. Uses TYPE_APPLICATION_OVERLAY so it survives on top of other apps (requires SYSTEM_ALERT_WINDOW permission granted via permissionIntent).

Constructors

Link copied to clipboard
constructor(context: Context)

Functions

Link copied to clipboard
fun hide()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun show(config: OverlayConfig)

Show the overlay. Idempotent — calling while already showing replaces the existing overlay with the new config.

fun show(label: String, onClick: () -> Unit)

Convenience overload — equivalent to show(OverlayConfig(label = label, onClick = onClick)).