Search code examples
androidtcpandroid-wifi

how to receive packet thru WiFi


I have some PC application that send some information to my android application using WIFI ( the PC application using the WIFI network to send simple TCP binary message ).

On my android application i want to receive this binary stream ( and after receiving - to do something with the message ( after de-Serialization ))

  1. How can i receive this message on the android side ?

  2. How can i open on my android application the WiFi port to receive this message ?


Solution

  • I think it was better to write this as a comment. But unfortunately I don't have enough reputation. But I guess this tutorial will work for you. Here

    I found some more examples but don't want to link them all here. Just googled Android TCP Server. Here