Pause loop until a task is complete

Hey
I am unable to send data from my android phone to arduino board via bluetooth. I have done it before to do the same with a different code and it worked fine. When i connect the module it blinks repeatedly
As soon as i connect my phone to the module and open the app its blinking pattern change. Like a delay then blinks twice, again delays for a while and blinks twice again and so it goes on until i exit from my app. When i exit it comes back to the previous blinking pattern

My code

void setup() {

Serial.begin(9600);
// put your setup code here, to run once:

// put your main code here, to run repeatedly:

}

void loop()
{
int x1,y1;
Serial.println(" Enter x ");
if(Serial.available())
{ x1=Serial.parseInt();
Serial.println("x is");
Serial.println(x1);
}
delay(100);
if(x1>0)
{
line11: Serial.println(" Enter y");
delay(100);

if(Serial.available())
{ y1=Serial.parseInt();
Serial.println("y is");
Serial.println(y1);
Serial.print("\n");
delay(100);
}
else
{
goto line11;
delay(100);
}
}
delay(1000);
}

The code works pretty well with the serial monitor alone.
I am not sure if the problem is with the hardware or code or with the app. If someone has an idea of whats going on please reply.