I want my Android device (Nexus S) to communicate with a PC app. I found an article about socket programming here Incorporating Socket Programming into your Applications . I wrote an app in c# that connects to the desired port and the communication is achieved. The problem is that when I send data through the connection nothing arrives on my phone. I can see the data that I sent when the connection is terminated. I wrote my code inside the "correct" handler that the author suggested.
Why is this happening? The code uses handlers so it should be able to manage multiple tasks. I'm quiet sure that Im mssing sth. I read about threads in the Dev Guide but still it couldnt help me enough. Can anyone provide resources about threads?
I was thinking of calling a new Activity using an Intent but woudn't that terminate the connection since the previous Activity whould go on Pause?
Thanks and sorry any rookie mistakes