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: 
walkerst
Visitor

new developer

I'm a new developer, and pretty much a rookie in any type of programming.
I've inherited the development of my companies roku app, and I've got a couple of questions.
1) i'm wondering if there is a way to figure out what the user's screen size and capture that size and print to the screen ?
so basically if the screen size is 1389 x 768 i can output to the screen "width = 1389 x height = 768", and even store that info in a variable.

2) can you assign remote keys to different functions. i'm really interested in what is the * key.

thanks.
Scott
0 Kudos
9 REPLIES 9
RokuJoel
Binge Watcher

Re: new developer

Hi,

you can get the screen dimensions from roDeviceInfo, however, there are only two possible sets of values that should be of concern:

720x480 (SDTV mode) (note that SDTV 16x9 mode has the same pixel dimensions)
1280x720 (HDTV mode)

so you can determine that with:


di=createobject("roDeviceInfo")
mode=di.GetDisplayType()


Weird fact: Nearly 40% of our users still use SDTV mode.

In some contexts you can assign all buttons except the Home button to any function you want, for example roImageCanvas and roScreen. In others it may not have any function and be undetectable. in some cases it has a reserved function, and in others it is detected via islistiteminfo() on messages from the message port.

However, be advised that the function of the * key may be changing in the near future, for example in Video playback using our roVideoScreen component it will pop up a box that should allow you to control the video caption settings, and on our recently announced Big Product it is possible that this button may wind up being a special "menu" key and not being available to developers at all.

- Joel
0 Kudos
greubel
Visitor

Re: new developer

I realize it's your box and you can do anything you want BUT there has to be another mechanism to allow devs access to all the buttons.
Just don't steal it. I know I use the star button for video info but it's outside of the video player.
0 Kudos
RokuJoel
Binge Watcher

Re: new developer

As I said, there are several screens where you have total access to all buttons except the Home button. Specifically the roImageCanvas and roScreen types allow access (through different mechanisms) to all the buttons on the remote except the Home button, this is because these two screen types are for creating your own custom screens.

- Joel

-
0 Kudos
joetesta
Roku Guru

Re: new developer

As a channel developer trying to reach the widest possible market, I'm thinking it's best to avoid the "star" button since older roku remotes just don't have it. Instead I'm considering using the "play" button to call up a menu of options from a grid or paragraph screen. Am I mistaken; are there only a small % of roku remotes with no star button out there? Is there any reason not to use the play button for this?
aspiring
0 Kudos
kc8pql
Visitor

Re: new developer

Am I mistaken; are there only a small % of roku remotes with no star button out there?


Very small I think. If I recall correctly, the only remote without an * button came with the very first box, the N1000 Netflix player.
____________________________________________________________________________________________________________
No, I don't work for Roku.
Netflix Player N1000X, XDS 2100X (premature death by lightning)
Roku2 XD 3050X, Roku2 XS 3100R, Roku2 4210R
0 Kudos
RokuJoel
Binge Watcher

Re: new developer

I think the original remote shipped with a few early models, including the n1101 and others. When I first became a Roku developer, both devices I bought had that remote. I suspect there are significant number of devices, but small relative to the total number of devices in use.

- Joel
0 Kudos
TheEndless
Channel Surfer

Re: new developer

The last Roku to come with a remote without the "*" and "Back" buttons was discontinued in September 2010. Over seven million of the eight million total devices sold have been sold since then.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
EnTerr
Roku Guru

Re: new developer

"kc8pql" wrote:
Very small I think. If I recall correctly, the only remote without an * button came with the very first box, the N1000 Netflix player.

Remotes have no "*" in all N1xxx boxes, that is the first 2008 model (N1000) plus the line from 2009 (N1050, N1100, N1101). And Roku HD '2010 (model 2000) - that one had Back but no *, AFAIR.
Throwback
0 Kudos
EnTerr
Roku Guru

Re: new developer

"RokuJoel" wrote:
However, be advised that the function of the * key may be changing in the near future, [...] on our recently announced Big Product it is possible that this button may wind up being a special "menu" key and not being available to developers at all.

How about long-press or double-tap of "*" being the TV system menu and single-press being left to Roku BRS platform behavior? Just thought i will throw it as an idea. It will be unwise to take away "local menu" functionality of *. One of the few things Android did better than iOS i think is adding "back" and "options" buttons in the handsets (the "search" button made no universal sense and is gone now). Another analogy - AppleTV remote does distinguish between short and long press on their Menu button.

PS. by the way with infrared remote it is already the case that long-press of * sends multiple key-downs, so double-tap or long-press are the same. The radio remotes might be different but their firmware can be updated as to distinguish long press from single one.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.