I am writing a flashcard program and would like to see the question on my android phone and at the same time want the answer to pop up on my PC. So the phone needs to push the answer to the PC, which is listening. The entire thing would go through wifi.
My current plan is to build an http server on the PC as a separate java application and use HTTP requests from the phone to push the flashcard answer. Is this a good idea or is there an easier way to do this, without HTTP? I just need to send single strings.
I am writing a flashcard program and would like to see the question on
Share
You can use HTTP, just create a TCP Listener on Port 80 and filter header messages out, the android part would be easier, because there are several api functions for http requests.
On the other side, a simple TCP Listener on any other Port would be better, because Skype is using for example port 80, and the performance would be a little bit better. The android part isnt much harder, you only have to set up a client on your port, and then send your message to your pc.
So i would suggest to use a custom port and a TCP Server on your PC and a TCP listener on android.