I need to use the infrared transmitter on an HTC One device. Before the lolipop update I could do this no problem, but now my code does not work.
ConsumerIrManager mCIR = (ConsumerIrManager)getSystemService(Context.CONSUMER_IR_SERVICE);
mCIR.transmit(freq, pat);
where freq and pattern are the required values to power on my TV (from the manufacturer)
I do not get any errors running this code, the only problem is that the infrared transmitter does not light up on HTC one devices. ( looking at ir blaster through camera ). I dont understand, the exact same code works on galaxy s5 devices. I would appreciate any help from someone who can get infrared to work on HTC one devices.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…