I want the user to select a text file so the app can read its content. in onActivityResult I have the following code:
Uri filePath = data.getData();
File file = new File(filePath.getPath());
filePath.getPath() brings this weird path: /document/**1EEB-0A13:**Download/filename.txt
I don't understand what is 1EEB-0A13:, I'm almost certain that without it, it would work. Needless to say that I get an exception that there is no such file or directory.
I saw a lot of examples on how to get the real path but they seemed to be related to images. I tried one of them but it threw an exception.