I built an Android app sometime back to control my Air conditioner, It used to work fine in Android 4.1 (I was using an HTC M8 phone), now after the upgrade to 5.0 lollipop it stopped working I am attaching a sample snippet.
There are no debug errors it says IR was transmitted.
--Air Conditioner brand Samsung (IR codes for on and off included)
PS: I have mocked up the code everything is connected,
//To hold my codes for remote say on, off temp+, temp-, swing etc
public class TransmissionCodes{
private int[] transmission;
private int frequency;
//+getters +setters +constructor
}
//To hold all the TransmissionCodes objects
SparseArray<TransmissionCodes> sequence ;
//power on
sequence.put(0, new TransmissionCodes(38000, "123,339,23,54,23,14,23,16,21,14,21,16,21,14,23,16,21,16,21,14,23,53,23,15,22,16,21,54,23,14,23,16,21,16,21,54,23,54,23,53,23,54,23,14,23,54,23,14,23,54,22,54,23,16,21,16,21,14,23,14,23,16,21,16,21,54,23,54,23,15,22,15,22,14,23,14,23,14,23,14,23,53,23,54,23,14,23,14,23,16,21,54,23,14,23,16,21,14,23,16,21,14,23,16,21,14,23,53,23,53,23,54,23,54,23,2500"));
//power off
sequence.put(1, new TransmissionCodes(38000, "123,339,23,54,23,14,23,16,21,14,21,16,21,14,23,16,21,16,21,14,23,53,23,15,22,16,21,54,23,14,23,16,21,16,21,54,23,54,23,53,23,54,23,14,23,54,23,14,23,54,22,54,23,16,21,16,21,14,23,14,23,16,21,16,21,54,23,54,23,15,22,15,22,14,23,14,23,14,23,14,23,53,23,54,23,14,23,14,23,16,21,54,23,14,23,16,21,14,23,16,21,14,23,16,21,14,23,53,23,53,23,54,23,54,23,2500"));
//IR call in main Activity
findViewById(R.id.button).post(new Runnable() {
public void run() {
ConsumerIrManager mCIR = (ConsumerIrManager) getSystemService(android.content.Context.CONSUMER_IR_SERVICE);
mCIR.transmit(sequence.getFrequency, sequence.getTransmission);
}
});
Here is a link that was near but couldn't help. Stack Overflow reference
Can someone help me out to put things together, or if I am missing anything??