I'm looking at using Google's Nearby API to detect beacons (Eddystone). The only current approach at the moment seems to be calling Nearby.Messages.subscribe()
as described here.
The problem is that this doesn't seem to be suitable for continuous scanning in the background. My app needs to keep monitoring beacons in the background so if one becomes visible, it would perform a call to a REST API. Basically, I'd need something similar to the beacon monitorning feature provided by the Estimote SDK.
Would this be possible to achieve with the Nearby API without draining the battery?
I realize this question is about how to use the Nearby API, but I don't know of a way to use it to meet your requirements.
If you are open to alternatives, the free and open source Android Beacon Library has full support for Eddystone beacons. Its API is modeled after the iOS monitoring/ranging beacon APIs, so it will do precisely what you want.
See here for how to use this library to monitor for Eddystone beacons.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With