In this tutorial, you will learn how to use the Nearby Connections API to link multiple devices over the same Local Area Network. You will learn how to turn one device into a host that advertises and controls connections, and turn other devices into peers that connect and communicate with each other through that host.
Source files for the Tuts+ tutorial: Google Play Services: Using the Nearby Connections API
Read this tutorial on Tuts+.