Forum Discussion

tifroz's avatar
tifroz
Streaming Star
6 years ago
Solved

Supporting / Detecting Roku OS versions from 8 to 10+

  • roDeviceInfo.GetOSVersion() is only available from Roku OS 9.2 so you have to detect the OS version before you can even attempt using this API
  • roDeviceInfo.GetVersion() assumes a single digit major version number, so it won't work (at least not as described by the docs - see below) after Roku OS 10 ships
  • Roku now requires channels to signal the launch complete scene.signalBeacon("AppLaunchComplete"), but the corresponding API isn't available until Roku OS 9.1

 

Putting it all together, the only way we can comply with Roku publishing guidelines after Roku OS 10 ships will be to drop support for Roku OS versions < 9.2. 

 

Note: description for GetVersion(), quoted from the documentation:

A 13-character string (for example "034.08E01185A"). The third through sixth characters are the major/minor version number ("4.08") and the ninth through twelfth are the build number ("1185"

  • Is this what you're looking for?

    ' Firmware Version Number
    ' Return 8.01, 9.01, etc if FW 9.1 or less
    ' Otherwise return 9.2, 9.3, 10.1, etc
    Function FwVerNum()
        di=CreateObject("roDeviceInfo")
        if FindMemberFunction(di,"GetOSVersion")=Invalid
            rv=Val(di.GetVersion().Mid(2,4))	
        else
            aa=di.GetOSVersion()
            rv=Val(aa["major"]+"."+aa["minor"])
        endif
        return rv
    EndFunction

10 Replies

  • renojim's avatar
    renojim
    Community Streaming Expert

    I brought this up years ago.  🙂  I think you're looking at it wrong.  There's no good reason to support older OS versions as every supported Roku will get any new OS version eventually.  You just have to set the Minimum Firmware version when you update your channel and anything running an older OS won't get the update until its firmware is updated.  The unsupported Rokus will never get the new OS or any channel updates for that matter, so there's nothing you can do to support them.  I suspect Roku will have GetVersion() return something for OS v10 like an A, but well have to wait and see.  I can't see a good use case for trying to support an older version, but there may be something I'm not thinking of.

    • tifroz's avatar
      tifroz
      Streaming Star

      As it stands, folks with older Roku devices won't be able to download our channel after OS 10 ships, and the only reason is because OS version detection prior to OS 9.1 only supports single digit numbers - it's just silly. 

      Thanks for taking the time to respond! Hopefully Roku will come up with something that can be worked out.

      • renojim's avatar
        renojim
        Community Streaming Expert

        I'm still missing what the real problem is; excuse me for being dense.  So you've got an update that uses something new from v10 or doesn't use something new.  If it doesn't use anything new, just set the Minimum Firmware Version to 9.1 (or whatever).  If it does use some feature that's new in v10, then no one that hasn't received v10 would be able to use it anyway.  Roku handles this automatically by not updating the channel on those units.

        Are you saying you have an update that could use some new feature in v10, but if it isn't there then you have a workaround to make it work in previous versions, so you need to test for OS version?  In that case I think you could publish one update with the Minimum Firmware Version set to 9.x (wait for it to get published) and then another update with the use of the new feature and the Minimum Firmware Version set to v10.

        There's no good reason to set the Minimum Firmware Version required to the latest firmware release.  Heck, I have channels I've updated and the Minimum Firmware Version is set to 3.x.  🙂  I have yet to receive v9.3 on any of my units, so I'm just setting the Minimum Firmware Version to v9.1 because I'm not using anything that's only available in v9.2+.

        I'm not trying to be difficult.  I'm just trying to understand the issue.