first of all, this forum is probably the most useful thing i have been using for my work on android (college project).
I required many parts (aspects) of android, and i've found it all very useful right here, so thanks to plusminus and others for helping.
Now, the problem, of course
The problem i have is with socket programming, i have been using it a lot in my project, and had no major issues with it, except the latest where i have to make a socket server on android emulator to wait for connections from others (particulary, only from server on the same computer using emulator).
I have read many articles about this issue, but still it's not very clear, the problem is that, after:
Using java Syntax Highlighting
- myServer = new ServerSocket(5000);
- //catch exception..
- //some functions..;
- //waiting for server on adroid to accept any incoming connections
- try {
- connection = myServer.accept();
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
the application just freezes (after the last line of code, when starting to accept connection).
and no errors are reported in the log, it just stops to responding. At the same time, i use a lot socket connecting in the same application (event at the same activity, actually service, that is), but this just doesn't work!
is there a simple and reliable solution for this?, obviously i am missing something important, because only this aspect of sockets doest work. I saw examples where the we should change something in the emulator settings, but what exactly?
I am grateful for any kind of help. if the solution exists on this forum, please point me to it, i've been searching for it for a long time.



