I have app for play video in android like as
https://play.google.com/store/apps/details?id=com.vlcforandroid.vlcdirectprofree&hl=en
I want to integrate this app in my app. I have Url for video Streaming and i want to open this video in this app(Vlc Direct), Any idea?
I open this app using:
Intent i = new Intent(Intent.ACTION_MAIN);
PackageManager manager = getPackageManager();
i = manager.getLaunchIntentForPackage("com.vlcdirect.vlcdirect");
i.addCategory(Intent.CATEGORY_LAUNCHER);
startActivity(i);
But how it start with video streaming, Or any other Player for video Streaming?
More like,
Intent i = new Intent(Intent.ACTION_MAIN);
i.setComponent(new ComponentName("com.vlcdirect.vlcdirect", "com.vlcdirect.vlcdirect.URLStreamerActivity"));
i.putExtra("url", url);
startActivity(i);
Which supposes that the component, activity, and payload are as shown, and also that the activity is explicitly or implicitly exported -- I don't know the actual values, or if the activity is exported. vlcdirect doesn't document this, but you can
ask the developer, or
view the log as you stream from a URL within that app, to identify the component and activity; dedex and decompile the .apk, to confirm the payload; duplicate payload classes, if necessary; give up and fume after the developer ignores you, if the activity is not exported.
Ideally you would broadcast a "view the stream from this URL" intent, and vlcdirect or any other suitable app would pick it up, but I don't know if vlcdirect or any other app respond to such.
VLC needs to be explicitly told the type:
Intent i = new Intent(Intent.ACTION_VIEW);
i.setPackage("org.videolan.vlc.betav7neon");
i.setDataAndType(Uri.parse("http://ip:8080"), "video/h264");
startActivity(i);
i.e. just "video/*" wouldn't work for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With