getFilenameFromUri

static String getFilenameFromUri(@NonNull() Uri uri, @NonNull() Context context)

Retrieves the filename of a Uri, if available.

Return

the filename

Parameters

uri

a Uri pointing to a file

context

Android context

Throws

if the Uri is not pointing to a file or the filename was not available