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; /* w w w .ja v a 2s.com*/ import android.support.v4.app.Fragment; // It hosts an instance of MediaFragment // NOTE: the intent received by MediaActivity when a user selects a media has an extra for the // media ID public class MediaActivity extends SingleFragmentActivity { /** A key for passing a media ID as a long */ // TODO: this key refers to the _id column, not the media_id column public static final String EXTRA_MEDIA_ID = "com.example.raul.test_streaming.media_id"; @Override protected Fragment createFragment() { // If the intent has a MEDIA_ID extra, create the MediaFragment using newInstance() // If not, just use the default constructor long mediaId = getIntent().getLongExtra(EXTRA_MEDIA_ID, -1); if (mediaId != -1) { return MediaFragment.newInstance(mediaId); } else { // TODO: this can not be executed because we have not yet implemented the feature of // TODO: adding a Media in the media table return new MediaFragment(); } } }