Global variables in Roku application

I have recently started making apps for the Roku box. Roku apps use a scripting language called Brightscript.

I wanted to add a global variable into my app so that I could use a string in any function of the app. Turns out that in Brightscript you only have access to one global variable and that is ‘m‘. You are able to create properties of m. I was able to declare m.channelName = “myglobalstring”¬†I could then use¬†m.channelName¬†anywhere in the app.

Leave a Comment