0

I'm in the process of creating an app to help people program their remotes. I've got the design set up and everything planned out for the most part, but I still don't know how I would go through setting up the codes for each individual remotes.

I have 4 remotes for the user to choose from, and 18 of the most popular TVs available. That would mean i would have 72 different string arrays with each having the program codes to a specific tv/remote combo. Is there a better way of going at this than creating 72 different string arrays?

More info can be provided if necessary, and someone please change the title of this post to better summarize this question if needed.

TheWizKid95
  • 721
  • 6
  • 16
  • 1
    Good rule of thumb I've heard: you should never have to _repeat_ information. Therefore: what will be consistent for each remote, independent of TV? Likewise, what will be consistent for each TV, independent of remote? – kittykittybangbang Jan 23 '15 at 02:35
  • What are the program codes used for? What are they? – James Westman Jan 23 '15 at 02:35
  • The remotes we have here don't have any sort of overlapping codes, so they own have their own 3 digit or 4 digit codes to program tv's so you can control your tv with that remote like a regular universal remote. The actual manuals for the individual remotes provided below http://www.universalremote.com/resources/pdfs/UR5U-9000L.pdf http://www.atmc.com/res/pdfs/cable/AdvUnivRemoteUserGuide.pdf http://www.tiftnet.com/support/hct/pdf/remote/cisco-dta-hdair2.pdf http://www.vermontel.com/images/at6400-remote-control-guide.pdf – TheWizKid95 Jan 23 '15 at 02:39

1 Answers1

1

Is each remote not a subset of codes from a 'master' list? Perhaps have a master list for each TV including every possible code.

Then a list for each remote specifying which options from the master list apply to that remote.

In this case you should have 18 arrays (1 for each TV) plus 4 arrays (1 for each remote), equals 22 arrays total.

darnmason
  • 2,672
  • 1
  • 17
  • 23
  • I actually could do that and that would definitely narrow the amount of lists down drastically. something like [this](http://stackoverflow.com/questions/5943330/common-elements-in-two-lists) could be done. I could just include all codes for every remote in an array for each tv and then vice versa for the remotes and find the common ones. This is definitely doable but I wouldn't like to mark the question as read just yet in case anyone else has other ideas. – TheWizKid95 Jan 23 '15 at 02:50
  • I guess for a specific Android case you could have 18 string arrays for the master lists of codes. Then the 4 remote configurations could be integer arrays, the integers being indexes into the master array. All done in XML resources assuming it's static data. – darnmason Jan 23 '15 at 02:59