You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> from Manifest
Increase targetSDK to at least 31
Start App without asking for location runtime permission
Perform any bluetooth related scan with the library. e.G. scanning
An error is thrown Caused by: com.polidea.rxandroidble2.exceptions.BleScanException: Location Permission missing (code 3)
Expected behavior
For Android 12 Devices, when targetting API 31, setting location is optional. The library should not force location permission to be set.
Smartphone (please complete the following information):
Device: Samsung S22 Ultra
OS: Android 12
Library version: [1.13.1]
Logs from the application when bug occurs (this will greatly help in quick understanding the problem)
To turn on logs use:
No I have not. I see this fixes the issue. Thank you! Maybe the error "Location Permission missing" is not ideal, but not gonna complain about it since it´s working now.
dariuszseweryn
changed the title
Android 12 / targetSDK 31 still requires ACCESS_FINE_LOCATION, should work without it
Android 12 / targetSDK 31 should give hint about actual permission missing
Jul 19, 2022
Describe the bug
Location Permission for Android 12 is optional (targetSDK needs to be >= 31). See https://developer.android.com/guide/topics/connectivity/bluetooth/permissions#declare-android12-or-higher
The library however forces FINE_LOCATION to be set.
To Reproduce
Steps to reproduce the behavior:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
from ManifestCaused by: com.polidea.rxandroidble2.exceptions.BleScanException: Location Permission missing (code 3)
Expected behavior
For Android 12 Devices, when targetting API 31, setting location is optional. The library should not force location permission to be set.
Smartphone (please complete the following information):
Logs from the application when bug occurs (this will greatly help in quick understanding the problem)
To turn on logs use:
Additional context
compileSdkVersion = 32
buildToolsVersion = "30.0.2"
minSdkVersion = 24
targetSdkVersion = 32
The text was updated successfully, but these errors were encountered: