Android App client method not able to connect to server
<p>I am new to java and android app programming, in my android app I have a client method:</p>

<pre><code>using the socket programming example in http://edn.embarcadero.com/article/31995
</code></pre>

<p>I invoke this method by calling it on a button click in my app by </p>

<pre><code>public void stopClick (View view){
        client();
}
</code></pre>

<p>I run server program (seperate project, code in the same link as mentioned above) as a java application and then run the app on android emulator but nothing happens between client and server and no error is thrown.
when i put this client code in a java class and make the method as main method and run it it runs fine with server. i dont know what i am missing. please help.server code is below.</p>
