Launching Android Netflix App And Passing Video Id

TheMethod picture TheMethod · Aug 13, 2013 · Viewed 10.8k times · Source

In the app I am working on I want to support Netfilx streaming. I intend on doing this by simply starting Netflix and passing a specific URI so it plays a specific video when started. Simple right? Well, the issue is I'm not sure how to pass the video id info in the Intent I use to start the Activity.

I've read the post here , but am unsure where to use this. I used Intent.setData() since it accepts a URI, but to no avail.

Here is what I have been doing (I am hard coding the movie data, this is just for testing purposes) :

// the Netflix intent
Intent intent = getPackageManager().getLaunchIntentForPackage("com.netflix.mediaclient");
//the uri
Uri uri = Uri.parse("http://movies.netflix.com/WiPlayer?movieid=70266228&trkid=13462049&ctx=0%2C1%2Ce2bd7b74-6743-4d5e-864f-1cc2568ba0da-61921755");
intent.setData(uri);
//launches but does not go to the video
startActivity(intent);

I've also tried using the URI protocol in the link above like so:

Uri uri = Uri.parse("nflx://movies.netflix.com/WiPlayer?movieid=70266228&trkid=13462049&ctx=0%2C1%2Ce2bd7b74-6743-4d5e-864f-1cc2568ba0da-61921755");

but still am not seeing the video play.

I feel like I am missing something simple here, although I have had very little luck Googling for this, I could find next to nothing about starting the Netflix Android app from another application. The Netflix developer resources don't have any info on this.

Does anyone have any suggestions on how I can do this or where I should be looking for documentation on this? Any help would be appreciated. Thanks much!

Answer

www.brunoneves.com picture www.brunoneves.com · Nov 6, 2015

Just some Android Apps intent names to help anyone.

Format: appName, packageName, className

Skype: com.skype.raider, com.skype.raider.Main

Netflix: com.netflix.mediaclient, com.netflix.mediaclient.ui.launch.UIWebViewActivity

ESexplorer: com.estrongs.android.pop, com.estrongs.android.pop.view.FileExplorerActivity

Youtube: com.google.android.youtube,com.google.android.youtube.HomeActivity

Chrome: com.android.chrome,com.google.android.apps.chrome.Main

VLC: org.videolan.vlc, org.videolan.vlc.gui.MainActivity

MBOXSettings: com.mbx.settingsmbox, com.mbx.settingsmbox.SettingsMboxActivity