I'm using the following code:
Intent fileIntent = new Intent(Intent.ACTION_GET_CONTENT);
fileIntent.setType("image/jpg|image/png|image/jpeg");
startActivityForResult(fileIntent, REQUEST_FILE);
I believe that code should allow me to select any jpg, png or jpeg file, but it doesn't.
On the other hand changing fileIntent.setType("image/jpg|image/png|image/jpeg"); to fileIntent.setType("image/*"); allows to select the file. But it also allows to select another image files I don't want to.
What needs to be corrected in fileIntent.setType("image/jpg|image/png|image/jpeg"); so it allows to choose files of those types and not other ones?