Search code examples
android-intentdeep-linkingnetflixandroid-tv

Movie Deeplink for Netflix Android TV app (com.netflix.ninja)


I have seen solutions on how to do movie deeplinking for Netflix for the mobile Netflix app, but for the Android TV version of the app those same solutions don't seem to be working.

I have tried using an Intent with action.VIEW and passing the normal Netflix URL such as: http://www.netflix.com/watch/{movieId} or with the nflx:// protocol.

For the android TV app only the nflx:// protocol seems to do anything where it opens the app and then it just stays at the main menu instead of playing the movie. Using the http:// protocol opens to netflix in the browser where it just asks you to download the phone or tablet app.

Has anyone been able to figure this out?


Solution

  • Netflix recently added universal search support to Android TV, which means there had to be some way to deep link to shows and movies. So I found a few flags you need to set to correctly open the show page. It seems like there are also extras which could be used to automatically start playing.

    public void OpenNFX() {
        Intent netflix = new Intent();
        netflix.setAction(Intent.ACTION_VIEW);
        netflix.setData(Uri.parse("http://www.netflix.com/watch/70291117"));
        netflix.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_CLEAR_TASK);
        getActivity().startActivity(netflix);
    }