ClipboardRepository

The system clipboard, as the data layer exposes it.

The clipboard is a platform data source, so a ViewModel reaches it through this repository rather than through a Context. The platform's own rules, such as whether the system confirms a copy, live here too, so callers never check Build.VERSION.

Inheritors

Properties

Link copied to clipboard
abstract val confirmsCopies: Boolean

Whether the system shows its own confirmation for every copy, as Android 13 and later do. An in-app confirmation would then report the same copy twice.

Functions

Link copied to clipboard
abstract fun copyText(label: String, text: String, isSensitive: Boolean = false)

Writes text to the clipboard under label.