Forum Discussion

dcrandall's avatar
dcrandall
Visitor
11 years ago

Deep linking: questions on protocol and deep research

I notice in the documentation:

http://sdkdocs.roku.com/display/sdkdoc/ ... inaChannel

The standard for deep linking parameters enforced by Roku to support ads or universal search is that channels use the following parameters:


...and then it mentions 'contentID' and 'mediaType'.

My question: must this be 'contentID' and 'mediaType', explicitly? For my purposes, this can work...there's plenty of room in those two things to squeeze what I need to in deep linking.

HOWEVER... say we wanted to use two other parameters, or we went with two other parameters thinking that it was ok to use whatever we want... will it work?

Also, is 'contentID' always a numeric? Can mediaType be any string?

6 Replies

  • You can use any parameters you want for your own channel. You only need to adhere to the "contentID" and "mediaType" recommendation if your channel content is going to be listed in the universal search, or if you're going to have ad banners on the Roku home screen. In the case of the home screen ads, you only need "contentID" and "mediaType" support there, if those ads are going to link directly to specific content in your channel.
  • Next question:

    mediaType Optional parameter to give context to the type of contentID passed.
    For example, these are sometimes used by Roku search to differentiate
    between searches for single titles, series, actors, etc.
      clip

      event

      channel

      sport

      league

      movie

      special

      series

      person

      episode

      game

      channel

      personseries

      personmovie

      personepisode

      appScreen (application specific parameter indicating a specific screen to navigate to)


    Say I want to use 'appScreen' because it's incredibly appropriate. Do I just do 'mediaType=myScreenToUse' or do I use 'appScreen=myScreenToUse' and relay another parameter?
  • You'd use mediaType=appScreen and contentID=myScreenToUse.

    mediaType describes the type of media that contentID points to.
  • "TheEndless" wrote:
    You'd use mediaType=appScreen and contentID=myScreenToUse.

    mediaType describes the type of media that contentID points to.


    What if I need to specify the contentID as well? contentId=myUniqueId&mediaType=appScreen and I want to deep link to say 'MyBestScreen'. Where do I specify that (MyBestScreen)?
  • "sonnykr" wrote:
    "TheEndless" wrote:
    You'd use mediaType=appScreen and contentID=myScreenToUse.

    mediaType describes the type of media that contentID points to.


    What if I need to specify the contentID as well? contentId=myUniqueId&mediaType=appScreen and I want to deep link to say 'MyBestScreen'. Where do I specify that (MyBestScreen)?


    What I had to do was sort of augment it for my purposes. I have to assume roku couldn't care less about what your contentId actually is, as long as you read 'contentId' as something.

    So in your case here, if I had to do it, I would go...

    contentId=myUniqueId_MyBestScreen&mediaType=appScreen

    Basically using a delimiter that my app, itself, would have to sort-out.
  • hmm, I was also thinking to do the same. Thank you, dcrandall!