downloaded image shows uri shown below dat=content://com.android.providers.downloads.documents/document/22
dat=content://com.android.providers.downloads.documents/document/22
while a get filename ==>22 is shown as filename w
You can get file name using this method
public String getName(String filename) { if (filename == null) { return null; } int index = filename.lastIndexOf('/'); return filename.substring(index + 1); }
In this message pass your URI as an argument
getName(uri.toString());