android controlled tv using Leonardo

Hello I am arduino leonardo user making an android controlled tv...
Leonardo uses Serial1 for bluetooth communication
so i am using this irSendDemo

\
#include <IRLib.h>
IRsend My_Sender;

void setup()
{
Serial1.begin(9600);
}

void loop() {

if (Serial1.read() != -1){
My_Sender.send(NEC,0x1FEE817, 32);
}}
\
it uploads easily and the ir led blinks when i send something using android phone
but it doesn't makes tv on\off....why??

but when i use serial instead of serial1 and use my keyboard send some character it works fine
and the Tv switches on off. and here is the code

\
#include <IRLib.h>
IRsend My_Sender;

void setup()
{
Serial.begin(9600);
}

void loop() {

if (Serial.read() != -1){
My_Sender.send(NEC,0x1FEE817, 32);
}}
\

ya its true i have used serial instead serial1 as in irLib examples..
Please help me how to make it work.. :frowning:

Perhaps your phone is sending a different number of characters than Serial Monitor. Repeating the command different numbers of times might produce different results. I would echo the incoming characters to Serial so you can see what is actually arriving.

johnwasser sir what can i do to resolve this