I'm using Java for my project for Android, and as a debugger at home I'm using Sony Xperia Z @ Android 5.1. Everything's fine with broadcast receiver there. Not at home when I have some spare time I'm using my personal Pixel @ Android 9. And one day I've discovered that same project with no changes doesn't find any nearby Bluetooth devices via BroadcastReceiver @Pie how it does @Lollipop.
BroadcastReceiver isn't registered in manifest. It's defined in source code and turning on and off only when it's needed.
I suppose that posting code will be redundant because it's working perfectly at earlier version of Android, and I am not receiving any warnings about using something obsolete or deprecated. But if code in this situation is important - I'll post it. I think the problem is in new rules for BroadcastReceiver starting from Android 8. So, what's new way of using it, if it exists. I've read about new rules for using BroadcastReceiver but found no changes in using it for discovering nearby Bluetooth devices.
Thanks.