DefaultClipboardRepository

ClipboardRepository backed by the system clipboard service. It keeps only the application Context, so it is safe to hold for the lifetime of the process.

Constructors

Link copied to clipboard
constructor(context: Context)

Properties

Link copied to clipboard
open override 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
open override fun copyText(label: String, text: String, isSensitive: Boolean = false)

Writes text to the clipboard under label.