Arduino and android

Hi,
i’m trying to create a simple project where i have an arduino with a led on its pin and thanks to an android app i can turn on and off this led. But i have some problems (probably with my arduino code) and i would be very happy if someone could help me.
This is the arduino code:

#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
IPAddress ip(192,168,0,254);
int led=3;
EthernetServer server(2000);

void setup() {
  
pinMode(led, OUTPUT);
digitalWrite(led, LOW);
Ethernet.begin(mac, ip);
server.begin();
Serial.begin(9600);
Serial.println("Ethernet e Android");
Serial.println();
Serial.println(Ethernet.localIP());

}

void loop() {
// wait for a new client:
EthernetClient client1 = server.available();
char thisChar = client1.read();
if (client1) {
if (thisChar=='0') {
digitalWrite(led ,LOW);
delay(500);
}
if (thisChar=='1') {
digitalWrite(led, HIGH);
delay(500);
}
}}

this is my java code:

package com.example.cerone.arduinoledsimple;

import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.IOException;
import java.net.Socket;
import java.net.UnknownHostException;




public class MainActivity extends ActionBarActivity {

    String s="0";

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);


        Button pulsanteOn = (Button) findViewById(R.id.On);
        Button pulsanteOff = (Button) findViewById(R.id.Off);
        TextView stato = (TextView) findViewById(R.id.text);

        stato.setText(s);
        pulsanteOn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                s = "1";
                connetti(s);
            }
        });

        pulsanteOff.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                s = "0";
                connetti(s);
            }
        });

    }

    public void connetti(String s)
    {
    Socket socket = null;
    DataInputStream dataInputStream=null;
    DataOutputStream dataOutputStream=null;
    try
    {
        socket =new Socket("192.168.1.254",2000);
        dataOutputStream=new DataOutputStream(socket.getOutputStream());
        dataOutputStream.writeUTF(s);
    }
    catch(UnknownHostException e)
    {
        e.printStackTrace();
    }
    catch(IOException e)
    {
        e.printStackTrace();
    }
    finally
    {
        if(socket!=null)
        {
            try
            {
                socket.close();
            }
            catch(IOException e)
            {
                e.printStackTrace();
            }
        }
        if(dataInputStream !=null)
        {
            try
            {
                dataInputStream.close();
            }
            catch(IOException e)
            {
                e.printStackTrace();
            }
        }
        if(dataOutputStream !=null)
        {
            try
            {
                dataOutputStream.close();
            }
            catch(IOException e)
            {
                e.printStackTrace();
            }
        }
    }
}
    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.menu_main, menu);
        return true;
    }

    @Override
    public boolean onOptionsItemSelected(MenuItem item) {
        // Handle action bar item clicks here. The action bar will
        // automatically handle clicks on the Home/Up button, so long
        // as you specify a parent activity in AndroidManifest.xml.
        int id = item.getItemId();

        //noinspection SimplifiableIfStatement
        if (id == R.id.action_settings) {
            return true;
        }

        return super.onOptionsItemSelected(item);
    }
}

and finally this is my xml code(for the app UI):

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:hint="Stato led :"/>


    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="ON"
        android:id="@+id/On"/>
    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="OFF"
        android:id="@+id/Off"/>



    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:weightSum="1">

        <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Stato :"
            android:padding="20dp" />
        <TextView
            android:layout_width="98dp"
            android:layout_height="wrap_content"
            android:id="@+id/text"
            android:layout_weight="0.07" />
    </LinearLayout>

</LinearLayout>