In the beginning the user can select files with the new Storage Access Framework (Assuming the app is API>19):
https://developer.android.com/guide/topics/providers/d
Well the solution has already been provided on the SO and you only needed to search for it.
This is the answer by Paul Burke. He has written a utility class which returns complete file path for such a content path.
He says:
This will get the file path from the MediaProvider, DownloadsProvider, and ExternalStorageProvider, while falling back to the unofficial ContentProvider method you mention.
and
These are taken from my open source library, aFileChooser.
FileUtils.java is the place where Paul Burke has written the method you're looking for.