How to return workable filepath?
<p>I have an activity that when users press "share" on a file it would open my app and start uploading the file. Now this works perfectly with images because the URI returned is for MediaStore. But I want to be able to return the URI from any source such as from ES File Explorer</p>

<p>Here is the current code:</p>

<pre><code>    public String getPath(Uri uri) {
      String[] projection = { MediaStore.Images.Media.DATA };
    Cursor cursor = managedQuery(uri, projection, null, null, null);
    int column_index = cursor
            .getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
    cursor.moveToFirst();
    return cursor.getString(column_index);
    }
</code></pre>

<p>How can I make this so instead of MediaStore it will be used for any type of file?</p>
