Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
MuviDev
Binge Watcher

One code for multiple Roku channels

Hi Developers,

We have a requirement where we have reuse the same code for 100 of Roku channels. We are digging for a best possible for this. We have an option for 

1. Mutiple Roku Channel codes in Workspace 
2. Different branch in GIT 

But both the options are troublesome when it comes for maintenance of codes. Is there a Target/Flavour type thing in Roku environment. Basically I came from iOS/Android background where we can reuse the same codes in different way. The requirement I have here can done in using Targets for same code in iOS and Flavours in Android and some part of code management also can be possible.

Could you please come up with a solution for this.

Regards
A Dev
0 Kudos
5 REPLIES 5
srikanth
Channel Surfer

Re: One code for multiple Roku channels

Hi @MuviDev ,

    I am also looking for the same, is there a solution that is available? 

Thanks in advance.

0 Kudos
RokuNB
Roku Guru

Re: One code for multiple Roku channels

Seems to me you would be best served by a single code base, where the app checks roAppInfo.getID() and based on that acts like the according app... no need for workspacing/code duplication. The actual Channel Store descriptions and images are entered in the dev.portal web site, so there is little (if anything) to vary in each bundle. 

Having such app, i would expect on start after determining under which channel ID it is running, code will contact web service and based on that receive exact configuration (content, chrome, customizations). 

Or, even simpler - why not just use Roku Direct Publisher where there's no need for coding but just populate online form with JSON feed for the content, if that would work for the use cases? 

 

0 Kudos
coldrain
Binge Watcher

Re: One code for multiple Roku channels

How about splash image defining in manifest file that shows up during startup? Is there a way to make it dynamically?

0 Kudos
RokuNB
Roku Guru

Re: One code for multiple Roku channels


@coldrain wrote:

How about splash image defining in manifest file that shows up during startup? Is there a way to make it dynamically?


good question! i am not aware of way of doing that, may be a good feature to ask for. 

Couple of workarounds to that: 

  • write app with generic splash (e.g. for the engine or publisher) and starting very fast - i.e. don't delay with network operations and data structure buildup before showing app's UI. Good idea in general, should minimize launch time. Then can show the custom per-app splash while connecting to service and loading config
  • or have a custom makefile which adds the different assets. That concedes needing different package for each app - while keeping source code the same
0 Kudos

Re: One code for multiple Roku channels

What about the images, by adding multiple project images with the same code base will increase the app size.

0 Kudos