Q:

How to get fileName from uri?

I got some uri, that looks something like this
content://media/internal/audio/media/48
I got it from intent, but I want to get the file name of the file it point to. How can I do this ?

A:

I found the solution 
Ringtone r=RingtoneManager.getRingtone(this, uri); 

and than the name is taken like this 
r.getTitle(this));

A:

If I understood you right, I would try create a new File object with File aFile = new File(uri) and then call getName() on aFile.
edit: or try it like this:
File aFile = new File(uri);
if(aFile.isDirectory())
{
aFile.list()
}
else
{
aFile.getName()
}

list() would give you a stringarray of the contained files...

