Android Socket Connection
Posted
by DrCoPe
on Stack Overflow
See other posts from Stack Overflow
or by DrCoPe
Published on 2010-06-08T20:37:24Z
Indexed on
2010/06/08
20:42 UTC
Read the original article
Hit count: 208
I'm guessing this will be such a newbee question but I hit a wall and...
I am running the jWebSocket (http://jwebsocket.org) stand-alone server. For a client I am using Weberknecht (http://code.google.com/p/weberknecht/) And Eclipse is my IDE of choice.
Now, when I start the server and run the Weberknecht client like a normal Java application I get a connection. Granted, the connection is quickly dropped because the handshake needs to be configured but at least the server shows me a connection was attempted.
However, when I use the exact same code in my hello world Android app I get nothing :( I am also not seeing any console outputs even thought I used both Log.i and Log.v
Log.i(TAG, "YEI! connectToWS 1!");
Log.v(TAG, "YEI! connectToWS 1!");
Maybe I am calling the connect method in the wrong place?
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
connectToWS();
...
Any help would be GREATLY appreciated!
© Stack Overflow or respective owner