2 ms·
On Android the broadcasting bit is fine. But to effectively scan for advertisements you need to start a foreground service and actively scan for them continuous
by IshKebab 7y ago
On Android the broadcasting bit is fine. But to effectively scan for advertisements you need to start a foreground service and actively scan for them continuously. That will keep the phone awake all the time and rinse your battery. It also don't really work very well because Android's Bluetooth stack is shockingly unreliable.
iOS is much much better. You can scan for iBeacons (a restricted subset of advertisements) continuously in the background and it works extremely well. Their Bluetooth stack is a million times faster and more reliable than Android's. But I'm pretty sure there is no way to scan for, or broadcast non-iBeacon advertisements in the background.
There are waaaay too many gotchas to do this reliably without OS support.