I am building an Android app that scans two types of beacon each second using the android-beacon-library:
I am using the library since the 2.10 release and everything works fine.
But, when I try to implement the 2.16.2, 2.16.3 and 2.16.4 releases on my Samsung S8 (which is running on Android 9), I can't scan my Beacons when I turn off the location. I did not have this issue with the 2.16.1 release.
I also tried the reference app to check if I did something wrong, but I have the same bug with the reference app.
I may specify that I only have this issue with Samsung.
Thanks.
Recent versions of Android require multiple levels of location authorization for an app to detect beacons (bolded items show added requirements):
SDK 29+ (Android 10.0+)
SDK 23-28 (Android 6.0-9.x)
SDK 18-22 (Android 4.3-Android 5.x)
The above restrictions have nothing specific to do with the Android Beacon Library -- they are an operating system requirement for any Bluetooth LE detection. If you see that some devices to not enforce these requirements under some conditions, then that is most likely an implementation hole on that specific platform. The more general rules still apply.