If I understood what was right, I will try to create a new File object with the file aFile = new File (uri), and then call getName () on aFile.
edit: or try to do it like this:
File aFile = new File(uri); if(aFile.isDirectory()) { aFile.list() } else { aFile.getName() }
list () will provide you with a string file of the contained files ...
source share