HTC ONE M8 IR Blaster after Lollipop Update not working

alexward1230 picture alexward1230 · May 4, 2015 · Viewed 10.5k times · Source

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.

Answer

Stephan Branczyk picture Stephan Branczyk · May 4, 2015

Yes, this issue seems to have been reported on the official bug tracker for Android.

I am developing an App which uses the official Consumer IR API introduced in Android 4.4 KitKat. Since the Lollipop rollouts for popular devices like the HTC One M8 or Samsung Galaxy S5 I am getting many reports from users of said devices that my App is not working on Lollipop. I do not own a Lollipop device myself, but I borrowed an M8 and did some tests.

It seems like the method ConsumerIrManager.transmit() is a no-op on Lollipop. No matter was pattern is given, it returns instantly.

Before discovering that Galaxy S5 users have the same problem, I contacted the HTC support on that matter and was told to contact the Google support.

It would seem S5 devices are getting the same issue as well, although it's hard to tell because developers are getting contradictory reports from S5 owners.

Here is an HTC-only fix that someone found for his M7 after it stopped working because of a Lollipop update. He basically reverted to an earlier version of the IR HTC API before they had switched to the official Google's api.

Otherwise, you should star the issue on the bug tracker, and perhaps point your own users to do the same. The more people star this issue, the higher priority it will be given.