Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 7

Re: model #'s

You should compare just the first 4 digits of the model.

if devinfo.GetModel().Left(4) = "4200" then ...

The table in the Developer Guide is supposed to be the source for this, but it hasn't been updated with the stick yet.

--Mark
0 Kudos
Highlighted
Level 9

Re: model #'s

"RokuMarkn" wrote:
You should compare just the first 4 digits of the model.


Thank you Mark, can you confirm the TV's are all 5000 ?
Kinetics Screensavers
0 Kudos
Highlighted
Level 7

Re: model #'s

Yes, GetModel() returns 5000X on TVs. GetModelDetails() returns a more specific model number for the TV.

--Mark
0 Kudos
Highlighted
Level 9

Re: model #'s

"RokuMarkn" wrote:
Yes, GetModel() returns 5000X on TVs. GetModelDetails() returns a more specific model number for the TV.

--Mark


Great! thank you.
Kinetics Screensavers
0 Kudos
Highlighted
Level 10

Re: model #'s

but my Roku HD is N1100, so only comparing the first four won't always work due to the first classic units having the letter first.
0 Kudos
Highlighted
Level 7

Re: model #'s

Good point. If you do want to specifically detect those models, you can do a special case test for the first letter being "N". But there are only four models of that type, N1000, N1050, N1100 and N1101. Except for distinguishing the last two, using the first four letters would be fine in these cases too. I doubt there's any reason to act differently on the N1100 and N1101 anyway.

--Mark
0 Kudos
Highlighted
Level 10

Re: model #'s

"RokuMarkn" wrote:
Good point. If you do want to specifically detect those models, you can do a special case test for the first letter being "N". But there are only four models of that type, N1000, N1050, N1100 and N1101. Except for distinguishing the last two, using the first four letters would be fine in these cases too. I doubt there's any reason to act differently on the N1100 and N1101 anyway.

1101 has USB, 1080p, 802.11 N, extra flash - which 1100 doesn't. First two may matter, i suppose.

I suggest sanitizing the string down to only the number(s):
BrightScript Debugger> modStr = "N1234X"   'imagine it came from ifdeviceInfo.Getmodel                 
BrightScript Debugger> modStr = createObject("roRegex", "\D", "").replaceAll(modStr, "")
BrightScript Debugger> ? modStr
1234
0 Kudos
Highlighted
Level 10

Re: model #'s

"RokuShawnS" wrote:
"Komag" wrote:
So I just recently ordered a refurbished Roku 1 2710XB

I assume the B means "refurBished"?

Er, possibly. I'd have to check into that though, as this is the first I'm hearing of XB.

In my experience, regarding refurbs:
  • "B" after model# is used on outside package only of refurbished models in the form 3050X-B or 3050-B (i have seen both kinds)

  • The sticker on the player stays 3050X

  • The player firmware (getModel()) always reports in 3050X format, never B

So "B" is qualifier "external" to the Roku box proper. I suspect the same of "EU", the difference being a different (external Smiley Happy ) power adaptor - different prongs at least. The packaging of new players i have seen show model as 3050R- with "R" suffix, to confuse us further. I suspect packaging specialized for some retailers (like Costco, with bonus cables) bear different suffix letter too. My dev. Rx: wholesale ignore the letters, stick with the model number.
0 Kudos
Highlighted
Level 7

Re: model #'s

"EnTerr" wrote:
"RokuMarkn" wrote:
Good point. If you do want to specifically detect those models, you can do a special case test for the first letter being "N". But there are only four models of that type, N1000, N1050, N1100 and N1101. Except for distinguishing the last two, using the first four letters would be fine in these cases too. I doubt there's any reason to act differently on the N1100 and N1101 anyway.

1101 has USB, 1080p, 802.11 N, extra flash - which 1100 doesn't. First two may matter, i suppose.


If you're trying to detect USB or 1080p, you should definitely NOT be looking at the model number. You should use roDeviceInfo.HasFeature(), which will work on all models, even on future models that didn't exist when you wrote the code. I'd actually be interested to know why developers have ever needed to look at model numbers, as a need to do that probably indicates a deficiency in HasFeature().

--Mark
0 Kudos
Highlighted
Level 9

Re: model #'s

"RokuMarkn" wrote:
"EnTerr" wrote:
"RokuMarkn" wrote:


If you're trying to detect USB or 1080p, you should definitely NOT be looking at the model number. You should use roDeviceInfo.HasFeature(), which will work on all models, even on future models that didn't exist when you wrote the code. I'd actually be interested to know why developers have ever needed to look at model numbers, as a need to do that probably indicates a deficiency in HasFeature().

--Mark

Like OpenGL or the amount of memory available to the 2D API fer instance.
Kinetics Screensavers
0 Kudos