Android Open Source - streaming_project Media Loader






From Project

Back to project page streaming_project.

License

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.

Java Source Code

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);
    }
}




Java Source Code List

com.example.streaming.streaming.ApplicationTest.java
com.example.streaming.streaming.AssetsPropertyReader.java
com.example.streaming.streaming.DataFetcher.java
com.example.streaming.streaming.DataLoader.java
com.example.streaming.streaming.MainActivity.java
com.example.streaming.streaming.MediaActivity.java
com.example.streaming.streaming.MediaDatabaseHelper.java
com.example.streaming.streaming.MediaFragment.java
com.example.streaming.streaming.MediaListActivity.java
com.example.streaming.streaming.MediaListFragment.java
com.example.streaming.streaming.MediaLoader.java
com.example.streaming.streaming.MediaManager.java
com.example.streaming.streaming.MediaProvider.java
com.example.streaming.streaming.Media.java
com.example.streaming.streaming.SQLiteCursorLoader.java
com.example.streaming.streaming.SingleFragmentActivity.java