getPathFromObserverUri

fun getPathFromObserverUri(uri: Uri): String?

Returns the file path of a given uri.

Calls queryRelativeDataColumn if the build version is greater than or equal to Build.VERSION_CODES.Q, otherwise calls queryAbsoluteDataColumn.

Return

the file path of the given uri

Parameters

uri

the uri to get the file path from