arduino and android

Hello I want to receive digital pin value (1(high) or 0(low)) from an Arduino by the serial port. Arduino can send 1 or 0. but i can not receive by android. here is my android code:

[code]
 byte[] bbuffer = new byte[1];

                     try {
                     mInputStream.read(bbuffer); 
                 } catch (IOException e) {
                         new Exception("Arduino-Board antwortet nicht! Timeout!!");
                 }

                     if (bbuffer[0] == (byte)1){

                    PinValue.setText("HIGH");


                    }

                    else if (bbuffer[0] == (byte)0){
                    PinValue.setText("LOW");


                 }

[/code]

Where is your Arduino code?

Where is your Arduino code?

Probably posted that on the Android forum. 8)

if (bbuffer[0] == (byte)1){

I think I’ll place a small bet that what is sent is not 1, but ‘1’

That’s my guess too. Won’t know until we see the code though.