do you have a better idea for me to debugg this code
You should have tested communication of both devices, that is use Putty/Serial monitor and a USB bluetooth dongle to:
A) check if the arduino responds to manually entered commands
B) see what does the phone and app send
I understand you did A, but you didn't do B.
The two procedures pretty much help in 95% of cases
EDIT
Ohh and I double checked your project and I just found out another error. You'll see what I mean when you do what I described above