[Android] playAudioList helper method

Geoffrey Métais git at videolan.org
Wed Feb 10 16:35:21 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Feb 10 16:28:25 2016 +0100| [d4fef85dfbc97a264b664cbf346e2a51af2c0274] | committer: Geoffrey Métais

playAudioList helper method

> https://code.videolan.org/videolan/vlc-android/commit/d4fef85dfbc97a264b664cbf346e2a51af2c0274
---

 vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
index cab97de..daae4aa 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/TvUtil.java
@@ -26,12 +26,14 @@ import android.net.Uri;
 import android.os.Parcelable;
 import android.support.v17.leanback.widget.Row;
 
-import org.videolan.vlc.gui.tv.browser.SortedBrowserFragment;
+import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
 import org.videolan.vlc.gui.tv.browser.VerticalGridActivity;
 import org.videolan.vlc.gui.video.VideoPlayerActivity;
 import org.videolan.vlc.media.MediaUtils;
 import org.videolan.vlc.media.MediaWrapper;
 
+import java.util.ArrayList;
+
 public class TvUtil {
 
 
@@ -67,4 +69,11 @@ public class TvUtil {
                 intent.setData(uri);
                 activity.startActivity(intent);
     }
+
+    public static void playAudioList(Activity activity, ArrayList<MediaWrapper> list, int position) {
+        Intent intent = new Intent(activity, AudioPlayerActivity.class);
+        intent.putExtra(AudioPlayerActivity.MEDIA_LIST, list);
+        intent.putExtra(AudioPlayerActivity.MEDIA_POSITION, position);
+        activity.startActivity(intent);
+    }
 }



More information about the Android mailing list