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.