Forum Discussion

walkerst's avatar
walkerst
Visitor
12 years ago

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

8 Replies

  • 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
  • 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

    -
  • 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?
  • 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.
  • 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
  • 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.
  • "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
  • "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.