I am using 3rd party file manager to pick a file (PDF in my case) from the file system.
This is how I launch the activity:
Intent i
The most condensed version:
public String getNameFromURI(Uri uri) { Cursor c = getContentResolver().query(uri, null, null, null, null); c.moveToFirst(); return c.getString(c.getColumnIndex(OpenableColumns.DISPLAY_NAME)); }