This is the music library for android. You can use this library by just download and import in your android project. In this library we provide you detailed list of song which is stored in your phone. Some methods are defined to get details of songs.
Follow these steps to use music library :-
Step 1: Download the sample project from given link –
Music library sample project
Step 2: Import this library (musicLib) in your android studio project from this sample project.
Step 3: Now in your activity or fragment write this line of code for get all songs list
public static ArrayList<SongData> song_list = PhoneMediaControl.getInstance() .getList(MainActivity.this, 1, PhoneMediaControl.SonLoadFor.All, "");
Step 4: Finally the list of songs in “song_list”
Step 5: Some methods are defined to get song details
- Song Title: getSongTitle()
- Song Artist: getArtist()
- Song Duration: getDuration()
- Song Path: getSongPath()
- Song Album: getAlbum()
- Song Album Id: getAlbumId()