Android TV: Play video file from smb share with VLC
Posted: 23 Nov 2016 09:07
Hello everyone
I apologize in advance, I post here because the topics under development do not really mention Android TV ... I also posted in https://code.videolan.org/videolan/vlc-android/issues
I would like to send an Intent to VLC to play a video from a smb share. With this code I got an ActivityNotFoundException
With this code, from https://wiki.videolan.org/Android_Player_Intents/, I'm able to launch VLC, I can see the VLC controls, the video title, but apparently the video has no length or something else but I'm not able to play the video file.
If I play the video file, from the VLC browser directly, still from the smb share, I can play it obviously AND the path is strictly the same (smb://my_share/.../video.mkv)
I apologize in advance, I post here because the topics under development do not really mention Android TV ... I also posted in https://code.videolan.org/videolan/vlc-android/issues
I would like to send an Intent to VLC to play a video from a smb share. With this code I got an ActivityNotFoundException
Code: Select all
Intent i = new Intent(android.content.Intent.ACTION_VIEW);
i.setData(Uri.parse(pPath));
App.GetContext().Activity.startActivity(i);
Code: Select all
Uri path = Uri.parse(pPath);
Intent i = new Intent(Intent.ACTION_VIEW);
i.setComponent(new ComponentName("org.videolan.vlc", "org.videolan.vlc.gui.video.VideoPlayerActivity"));
i.setData(path);
App.GetContext().Activity.startActivity(i);