copy

fun copy(context: Context, label: String, text: String, clearAfterMs: Long = DEFAULT_CLEAR_MS)

Copies text to the clipboard, marking it sensitive on Android 13+, then schedules an automatic clear.

Parameters

label

Clipboard label shown to the system.

text

The secret content to place on the clipboard.

clearAfterMs

Delay before the clipboard is cleared if unchanged.