Function

firstUriOrNull

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

firstUriOrNull

Source set: Android
public 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.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: