On version 2.20.7, everything works correctly in the application, namely, if you enable scanning in foreground with a notification display, then after restarting, scanning is going on, according to the logs, but the beacons are not found, however, simply opening the application helps to correct the situation.
This does not happen on version 2.21.1. The code is identical, I also tried the Settings API, but there is no difference.
This behavior does not work well on the new version in my case, since scanning should happen essentially all the time.
There are cases with rebooting, updating, and force stop, but we don't take them into account, since just opening the app is enough for the beacons to be located.
Just in case, I'll clarify what I'm running in Application#onCreate, which starts after a reboot, but does not catch beacons, opening the application solves the problem (that is, there is no repeated call to Application#onCreate).
Please tell me, what could be the problem and is it possible to return the behavior of version 2.20.7?