[Android] Restore video launch directly in video player

Geoffrey Métais git at videolan.org
Fri Oct 13 16:28:39 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Oct 12 15:57:04 2017 +0200| [bea00ef60ef057bee136b3e541e91bfa159a8f62] | committer: Geoffrey Métais

Restore video launch directly in video player

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

 vlc-android/src/org/videolan/vlc/StartActivity.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/StartActivity.java b/vlc-android/src/org/videolan/vlc/StartActivity.java
index 15116def4..408f7677f 100644
--- a/vlc-android/src/org/videolan/vlc/StartActivity.java
+++ b/vlc-android/src/org/videolan/vlc/StartActivity.java
@@ -37,6 +37,7 @@ import org.videolan.vlc.gui.SearchActivity;
 import org.videolan.vlc.gui.helpers.hf.StoragePermissionsDelegate;
 import org.videolan.vlc.gui.tv.MainTvActivity;
 import org.videolan.vlc.gui.tv.audioplayer.AudioPlayerActivity;
+import org.videolan.vlc.gui.video.VideoPlayerActivity;
 import org.videolan.vlc.media.MediaUtils;
 import org.videolan.vlc.util.AndroidDevices;
 import org.videolan.vlc.util.Permissions;
@@ -94,7 +95,10 @@ public class StartActivity extends FragmentActivity implements StoragePermission
     }
 
     private void startPlaybackFromApp(Intent intent) {
-        MediaUtils.openMediaNoUi(intent.getData());
+        if (intent.getType() != null && intent.getType().startsWith("video"))
+            startActivity(intent.setClass(this, VideoPlayerActivity.class));
+        else
+            MediaUtils.openMediaNoUi(intent.getData());
         finish();
     }
 



More information about the Android mailing list