Google's new Nearby API set has been available to developers since last year, but is only now seeing support on the consumer side, thanks to its presence in the newest update to Google Play Services. The Nearby API set is a way for Android devices to, as the name says, notice other Android devices nearby. This is accomplished in three ways; via Bluetooth, by sending out a unique token that another device can pick up on and send a response to, via Wi-Fi, by comparing current networks and available access point lists, and via a sound imperceptible to the human ear. When two devices hear that sound from one another, they can use it to find each other and connect using the Nearby API.
The possible uses for Nearby are extremely wide-ranging. Local multiplayer gaming is just one possibility, which could extend to full-room VR gaming with Daydream. Imagine your backyard turned into an action game, with your best friend at your side tackling the hostile world with you. You could also share a different VR space with somebody, such as an art project a la the HTC Vive's Tilt Brush. Things like this are all done through the Connections API. Using the Connections API, developers can find other users of an app in your immediate vicinity and link you up with them effortlessly. Things like full-band editing in a music app, real-time collaboration in productivity apps and quick device hookups for sharing large files all become a snap with the Connections API.
The other API in the set, called Messaging, does exactly what it says on the tin. Messages are sent and received in real time, but are unencrypted as a result. Obviously, this means that confidential information should not be shared via this API. Using the Messaging API, users can send and receive messages with one another when nearby at any time. Tying into the examples from earlier, say you've joined a friend in a VR world via Nearby. If you both have headphones and headsets on, how do you communicate? The developer could integrate a communication solution into their app, but that would waste overhead on the memory and processing stacks responsible for the app itself, and require a lot of extra coding. The Messaging API is perfect for that sort of thing. Outside of VR, collaboration in a quiet library could stay quiet with the Messaging API, or users of a semi-anonymous app that uses Nearby, like an app to swap files or play a game together without formally linking up, could use the Messaging API to communicate and even find one another in the real world.
The selection of apps using Nearby is, for now, extremely limited. The API may have been available for a while, but support on the consumer end is only recently being rolled out, meaning that devs have not had much opportunity to test their apps outside of their own setups, and many devs haven't even bothered integrating Nearby yet, since it wouldn't have done anybody any good before the APIs rolled out to consumers. Even in the apps that do use Nearby, the uses are a bit on the limited side, for now. In to-do and workflow mapping app Trello, for instance, users can share boards locally and search for other boards in the room, making the app that much more useful for meetings or deciding household chores, among other uses. A rather cool app, Thought, uses the Messaging API to allow for anonymous chatting with anybody using the app in your immediate vicinity. With how ubiquitous Android smartphones are these days, a crowded bus terminal could become a verbal wild west, or anonymous sweet nothings in a bar could spark a hookup without having to confront any nervousness associated with initial face-to-face interactions. These are, of course, only a few uses of the API set. It's still incredibly early on and developers are sure to think of tons of novel ways to use the Nearby API in the near future, from integrating it into augmented reality applications to letting users send each other voice messages on the road, such as telling somebody that a taillight is out.