tifroz
6 years agoStreaming Star
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