EnTerr
10 years agoRoku Guru
Getting channel's ID, how? [answer: roAppInfo.getID()]
I wonder how a program running on Roku can figure out its channel ID? The (mostly) numeric ID that's used to /launch or /input to.
There are situations that can be useful, one is for a shared/library code between different channels. Another one i have at hand is, say i have two of the same channels - one with ID "12345", the other one "23456". 12345 is a beta, 23456 is a release - they are exactly the same as code base and even use the same registry but need to act a hair differently - say one shows a "beta" placard. So if when started, the code can check "who am i?" - then it can implement that local difference based on hearing back the ID.
Seems to me appropriate place for this is a method (getSelfID? getAppID?) in roDeviceInfo but nothing related i can find so far.
There are situations that can be useful, one is for a shared/library code between different channels. Another one i have at hand is, say i have two of the same channels - one with ID "12345", the other one "23456". 12345 is a beta, 23456 is a release - they are exactly the same as code base and even use the same registry but need to act a hair differently - say one shows a "beta" placard. So if when started, the code can check "who am i?" - then it can implement that local difference based on hearing back the ID.
Seems to me appropriate place for this is a method (getSelfID? getAppID?) in roDeviceInfo but nothing related i can find so far.