Choosing the right API | nearby api
ThefollowingguidelineswillhelpyouchoosetherightNearbyAPItouseforyourapp.TheNearbyConnectionsAPI[1]allowsappstoeasilydiscover,connectto,andexchangedatawithnearbydevicesinreal-time,regardlessofnetworkconnectivity.ItusesBluetooth,Wi-Fi,andothertechnologies,andisdesignedtohidethecomplexityofthesetechnologiessoyourappcanfocusondiscoveringandinteractingwithnearbydeviceseasily.YoushouldchoosetheNearbyConnectionsAPIforyourappwhen:YouwanttodiscovernearbydeviceswithoutrequiringInternetconnectivityandi...
The following guidelines will help you choose the right Nearby API to use for your app.
The Nearby Connections API[1] allows apps to easily discover, connect to, and exchange data with nearby devices in real-time, regardless of network connectivity. It uses Bluetooth, Wi-Fi, and other technologies, and is designed to hide the complexity of these technologies so your app can focus on discovering and interacting with nearby devices easily.
You should choose the Nearby Connections API for your app when:
You want to discover nearby devices without requiring Internet connectivity and incurring the cost of a network round-trip on each operation.
You want to stream content or transmit arbitrary payloads or files between nearby devices.
You want to use the latest peer-to-peer technologies such as Wi-Fi Aware[2] when available.
You only need to communicate between Android devices.
The Nearby Messages API[3] allows apps to...