Skip to content
Advertisement

How set to show the name of music and it on my phone

I have a question now i try create a music app on my phone. now I can see my file song But the name shown in the app is the file address instead. and if i want to play the file music in this app. What code do I need to add for get the name of music and play it on my phone? thank a lot

JavaScript

send.setOnClickListener(new View.OnClickListener() {

JavaScript

} AND

JavaScript

}

Advertisement

Answer

now I can see my file song But the name shown in the app is the file address instead

I think you are referring to the “Path” of the file, for example:

/storage/emulated/0/song.mp3 (Unix style path)

C:Songssong.mp3 (Window style path)

If you would like to parse (find out) the name of the file, use the following code:

JavaScript

In your case:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement