In my Android Application, I want to select MP3 files. I have written the following code as mentioned on various thread.
Intent intentSelectAudio = new Intent();
intentSelectAudio.setType("audio/mpeg3|audio/x-mpeg-3");
intentSelectAudio.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intentSelectAudio, "Select Audio File"), RQS_OPEN_AUDIO_MP3);
There are two problems with this. 1) On some device the menu opens but user is unable to select any MP3 file as everything is disabled. 2) On almost all the devices the menu has several options to select the file. But the some options like "Recent", "Drive", "Audio" are available but user is unable to select files. Also it is showing external file explorer apps as well which is not working either.
Cant I disable the options which are not allowing user to select the files ? What is the way to only show application which allows user to select the desired MP3 file ? Why it is not working on some device ?