I want to build a android app for IR-based TV remote control. In Android Docs, I got this : https://developer.android.com/reference/android/hardware/ConsumerIrManager.html
In this doc, there is a method transmit
which takes two parameters : carrier frequency and pattern.
Are these parameters unique to different TV models?
Assuming them to be unique and if I want to control a Samsung Smart TV with this app, then how can I access corresponding data for passing as parameters in the transmit
function.
Yes the carrierFrequency and pattern parameters are usually unique to the different models and brands. However, chances are the same maker may use the same pattern across different models.
For example, this pattern may work for the SAMSUNG smart TVs (power button):
carrierFrequency: 38000
pattern: 4500, 4500, 560, 1680, 560, 1680, 560, 1680, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1680, 560, 1680, 560, 1680, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1680, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, 1680, 560, 560, 560, 1680, 560, 1680, 560, 1680, 560, 1680, 560, 1680, 560, 1680, 560, 46946
(make sure your phone has the built-in IR blaster hardware)
There is no easy way to find the patterns for a specific TV. That's why there are people or companies scan and collect those patterns for share or for sale.