ClipEntry


Platform specific protocol that expresses an item in the native Clipboard.

Summary

Public constructors

ClipEntry(clipData: ClipData)
android

Public properties

ClipData
android
ClipMetadata

Returns a ClipMetadata which describes the contents of this ClipEntry.

Cmn
android

Extension functions

Uri?

Returns the first non-null Uri from the list of ClipData.Items in this ClipEntry.

android

Public constructors

ClipEntry

ClipEntry(clipData: ClipData)

Public properties

clipData

val clipDataClipData

clipMetadata

val clipMetadataClipMetadata

Returns a ClipMetadata which describes the contents of this ClipEntry. This is an ideal way to check whether to accept or reject what may be pasted from the clipboard without explicitly reading the content.

Calling this function does not trigger any content access warnings on any platform.

Extension functions

firstUriOrNull

@ExperimentalComposeUiApi
fun ClipEntry.firstUriOrNull(): Uri?

Returns the first non-null Uri from the list of ClipData.Items in this ClipEntry.

ClipEntry can contain single or multiple ClipData.Items. This function is useful when you are only interested in processing just a single Uri item inside the ClipEntry.

It's advised that you consider checking all the items inside ClipEntry.clipData to thoroughly process a given ClipEntry.