The Nearby Connections API enables your app to easily discover other devices on a local network, connect, and exchange messages in real-time. You can use the Nearby Connections API to give your apps the following capabilities:

  • Collaborative whiteboard: Jot ideas down with nearby participants on a shared virtual whiteboard.
  • Local multiplayer gaming: Set up a multiplayer game and invite other users on the local network to join it. Your app can also allow a player to start an in-game mission when enough nearby participants join.
  • Multi-screen gaming: Use a phone or tablet as a game controller to play games displayed on a nearby large-screen Android device, such as Android TV. Your app can also enable players to see a customized game screen on their personal devices while all nearby participants see a shared common view on a large-screen Android device.

The API is located in the com.google.android.gms.nearby.connection package, and lets you build apps that can join multiple nearby Android devices together on the same local network. One device advertises on the network as the host, while other devices act as clients and send connection requests to the host.