Back to project page streaming_project.
The source code is released under:
GNU General Public License
If you think the Android project streaming_project listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.example.streaming.streaming; // ww w. j a v a 2 s. co m import android.content.Context; // TODO: tell who is using this class!!! public class MediaLoader extends DataLoader<Media> { private long mMediaId; // TODO: we are using mediaID which is already being used as one of the column in the media table // TODO: actually we should be referring to the id column in the media table // NOTE: mediaId is the ID of the media to load public MediaLoader(Context context, long mediaId) { super(context); mMediaId = mediaId; } @Override // NOTE: asks the singleton MediaManager for a media with the mMediaID ID and returns it public Media loadInBackground() { return MediaManager.get(getContext()).getMedia(mMediaId); } }