Network an Android with a Desktop PC

For our first project, we’re going to exchange data between a desktop PC and an Android device using Wi-Fi. Wireless local area networks provide us with a high-bandwidth connection, which allows us to write applications that let us interact with peers within the network in real time. We can send fairly large data payloads without noticeable delays, making it a good choice for a diverse range of multiuser applications.

We’ll need to import the networking classes described in Working with Networking Classes, so we can exchange data over a common port, as illustrated in the figure. We’ll use oscP5, which builds on and requires Processing’s core netP5 library for the exchange of data. We also use the KetaiNet ...

Get Rapid Android Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.