KitKat IR sdk
http://developer.android.com/reference/android/hardware/ConsumerIrManager.html
LG IR sdk
http://developer.lgmobile.com/MOBILE_HELP/topic/lge.mobilesdk.LGQRemote.api/Documents/reference/com/lge/hardware/IRBlaster/IRBlaster1.htm#sendIRPattern(int, int[])
I am developing android application which uses infrared transmitter. There are 2 buttons which should send given ir patter. I have used raspberry pi with lirc to read these codes from original remote for my device.
My pattern to be sent looks like this (It's decimal duration values):
1771 821 3499 823 869
Using LG IR sdk on LG2 I am able to send this data properly this using method mentioned above:
int frequency=38000;
int[] rawCodes=new int[]{1771,821,3499,823,869};
mIR.sendIRPattern(frequency, rawCodes);
I tested sent data with LG G2 again on raspberry pi with lirc and decoded values are nearly identical as values in given array. Unfortunately using KitKat sdk ConsumerIrManager on Samsung Galaxy S4:
int frequency=38000;
int[] rawCodes=new int[]{1771,821,3499,823,869};
irManager.transmit(frequency,rawCodes);
Sent data is diffrent than I expected. Reading data sent by samsung with lirc it looks like sometimes received data is correct but sometimes there are totatally different values (like 2 quite big values). Do you guys know what I am doing wrong? As far as I know there are no difference between LG sdk and Kitkat sdk methods so I don't know why these 2 phones sometimes send different signals.