Thursday , January 9 2025

Music library for android

music_library_banner

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 –

 

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

  1.    Song Title:   getSongTitle()
  2.    Song Artist:  getArtist()
  3.    Song Duration: getDuration()
  4.    Song Path: getSongPath()
  5.    Song Album: getAlbum()
  6.    Song Album Id: getAlbumId()

About admin

Check Also

Binding JavaScript and Android Code – Example

When developing a web application that’s designed specifically for the WebView in your Android application, …

Leave a Reply