I'm writing a simple image viewer for Android. My app have the "Open file from Gallery" button. So, when I've choosed the image from Gallery, it must return the path to file into my app, but it return a strange Uri, which looks like content://media/storage/2ch/30128
.
How I can get an absolute file path from this Uri? Here's some code for launching Gallery:
Intent i = new Intent();
i.setType("image/*");
i.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(i, "Выберите файл"), PICTURE_REQUEST_CODE);
P.S. Excuse for my English