Nearby Connections enables advertising and discovery of nearby devices, as well as high-bandwidth low-latency encrypted data transfers between these devices in a fully-offline P2P manner.
BLE device remains in sleep mode constantly except for when a connection is initiated.
The publish-subscribe messaging pattern requires a message broker. The broker is responsible for distributing messages to interested clients based on the topic of a message.
Create an instance of Google API Client in activity’s onCreate() method. Use GoogleApiClient.Builderclass to add the LocationServices API, as the following code snippet shows.