getFileName

fun getFileName(context: Context, uri: Uri): String?

Helper method to retrieve the display name of a file given its Uri by querying the content resolver.

Return

The display name or null if not available.

Parameters

context

Application context.

uri

The Uri of the file.