problem with wif.

I have an application on my android device that sending through the wifi chars from 0 to 5 and my arduino needs to do some tasks according to the char that it received.
when I run the serial monitor on the arduino program I see that I received those chars but the task according to those chars does not executed.
can anyone help me?
my board is arduino mega 2560 and my wifi sheild is adafruit cc3000.

my arduino code is attached

sagy.ino (5.82 KB)

void States(char CS)
{
  switch(CS)
  {
  case 0:  
    break;
  case 1:

It is highly unlikely that you are sending 0, 1, 2, etc. It is far more likely that you are sending '0', '1', '2', etc.

I also try with '0' '1' '2' etc. and still it doesn't working.

sagyman: I also try with '0' '1' '2' etc. and still it doesn't working.

Seems like a real shame. I don't see any debug code, though, so I have to wonder why you are not trying to help yourself.