Nearby Connections API

In a blog post on the Android Developers Blog yesterday, Google has announced Nearby Connections 2.0 API. The Nearby Connections 2.0 is a fully offline, high bandwidth peer to peer device communication. The API was opened up for all Android devices with Google Play Services installed.

Google explains the Nearby Connections as a networking API that allows apps to easily discover, connect to, and exchange data with nearby devices in real time, regardless of network connectivity.

What is an API?

Application Programming Interface or API is the base upon which an application runs. We can explain API as a messenger that carries your commands to the application and brings the app’s response to you. It is the interface between you and an application.

Nearby Connections 2.0 API

Nearby Connections 2.0 API image

So with this release, Google has offered the Nearby Connections 2.0’s API to developers, so they can code it to do more in the way they want.On their developer’s blog, Google has quoted certain examples of what some companies are doing using Nearby Connections API

On their developer’s blog, Google has quoted certain examples of what some companies are doing using Nearby Connections API:

  • Android TV is building a Nearby Connections based remote control app to enable second-screen experience and easy initial setup.
  • Hotstar is working to enable Media Sharing in places with weak or no internet connectivity
  • GameInsight is on its way to use Nearby Connections 2.0 to find nearby players and run games offline.

In simple words, Nearby Connections 2.0 will enable offline multiplayer gaming, multi-screen gaming (Using your phone/tablet as a controller), offline file-transfer, and more.

Technical Details

The Nearby Connections API is available for all Android devices running Google Play services 11.0 and up. The API uses WiFi and Bluetooth as a medium to transfer bytes, files or streams of data.

This API has a connection based on Unix-Socket Semantics. It supports two topologies.

  • Star Topology: Through this topology, you can have a central device, to which the other devices will connect and function through.
  • Cluster Topology: This topology can be used for creating a mesh-like network where several devices are interconnected, unlike the Star topology, where there’s just one central device.
SOURCESource
SHARE
An avid reader, writer, and motorcyclist, Manik is intrigued by the ever evolving tech ecosystem. Manik is responsible to take care of what’s happening in the Indian smartphones market and update the website readers accordingly through his detailed coverage on any given topic. In his free-time, you’ll find him fine-tuning his Bike or exploring the web for something new.