title: How to connect Android App connecting to a web service
body: <p>I created a small app and with this app I want to send the data (over wifi or bluetooth) to a PC/server.</p>
  
  <ol>
  <li><p>I am thinking of creating a webservice that will run on the PC and will be listening constantly to any incoming client requests.</p></li>
  <li><p>Once it receives request from client, the data transfer takes place.And after the webservice receives the data it should automatically open an application/GUI window showing the data received.</p></li>
  </ol>
  
  <p>My question is Can I create a webservice using TCP/IP in JAVA and have it constantly run in background and listening to client request?
  Also how do I start a GUI as soon as the webservice detects a client request and receives the data?</p>