Android Open Source - Bongo Play List Data






From Project

Back to project page Bongo.

License

The source code is released under:

Apache License

If you think the Android project Bongo listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package info.llanox.mobile.data;
//  www .j  a  va  2  s. c o m
import info.llanox.mobile.model.Song;
import info.llanox.util.FileUtil;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import android.content.Context;

public class PlayListData {

  private Context mContext;
  
  public PlayListData(Context context) {
      this.mContext = context;
  }
    
  
  public List<Song> getAllPlaylistSongs(){
    List<Song> songs = new ArrayList<Song>();
    File[] songFiles = FileUtil.getFilesFromSDPath("/Music/");
    
    Song song = null;
    for(File songFile:songFiles){
      song = new Song();
      song.setName(songFile.getName());
      song.setPath(songFile.getPath());
      songs.add(song);
    }
    
    return songs;
    
  }

}




Java Source Code List

info.llanox.mobile.PlayListActivity.java
info.llanox.mobile.PlayerService.java
info.llanox.mobile.adapters.SongAdapter.java
info.llanox.mobile.data.DBRepository.java
info.llanox.mobile.data.PlayListData.java
info.llanox.mobile.model.Song.java
info.llanox.util.FileUtil.java