How do I read the mp3 files in the memory? will play the files in the raw folder, but I do not know how to read the ones that the user has on his android ...
I have created these variables
Context context = this;
ListView lista;
ArrayList<Object> elementos = new ArrayList<>();
On the Oncreate I have the following
lista = (ListView) findViewById(R.id.lista_musica);
cargardatos();
ArrayAdapter adapter = new ArrayAdapter(context, R.layout.support_simple_spinner_dropdown_item, elementos);
lista.setAdapter(adapter);
and outside the OnCreate I have the class loaddata
private void cargardatos() {
elementos.add("primero");
elementos.add("segundo");
elementos.add("tercero");
}
when starting the application shows the following
I want that in the part that says first, second and etc, the music that the user has on his phone is placed, the buttons to play will be created later.