Open rbarzel opened 2 years ago
Have you read this "https://github.com/AltBeacon/android-beacon-library/issues/1067" ? need extra permission android 12
Facing same issue. Even after providing ACCESS_BACKGROUND_LOCATION unable to detect beacons when targetSdk is 31. If i downgrade targetSdk to 30 things are good. Android Version: 12 Model: Samsung AltBeacon Version: 2.19.4
When targeting Android 12+ you additionally need the user to grant BLUETOOTH_SCAN permission. (This is a newer Android OS restriction for Bluetooth scanning and is not specific to this library). The Kotlin reference app has been updated to show this.
Expected behavior
The reference application should work with targetSdkVersion of 32
Actual behavior
The reference application fails to receive callback when a beacon is detected if targetSdkVersion is set to 31 or higher.
Steps to reproduce this behavior
In build.gradle set
In AndroidManifest.xml add the following line to the element
android:exported="true">
Note that the app does not see nearby beacons with the above settings.
Mobile device model and OS version
Google Pixel 4, Android 12
Android Beacon Library version
2.19.3 IMPORTANT: This forum is reserved for feature requests or reproducible bugs with the library itself. If you need help with using the library with your project, please open a new question on StackOverflow.com.