Artem Gapchenko has created a new Android Bluetooth scanning library called Luch that looks for beacons when the app is in the foreground. Unique features include it’s lightweight at a just over 50Kb, it performs RSSI smoothing and it calculates distance based on the RSSI.
There’s an article on Medium and the source code on GitHub.