Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper permission check in BluetoothLEManager #10

Open
sproctor opened this issue Mar 11, 2023 · 3 comments
Open

Improper permission check in BluetoothLEManager #10

sproctor opened this issue Mar 11, 2023 · 3 comments

Comments

@sproctor
Copy link

SDK 31+ shouldn't need ACCESS_FINE_LOCATION permission, but BluetoothLEManager requires it.

public void start() {
        if (ContextCompat.checkSelfPermission(this.context, "android.permission.ACCESS_FINE_LOCATION") != 0) {
            DebugConfig.logAsMessage(DEBUG_TYPE.TYPE_DEBUG, "BluetoothLEManager", "start: Cannot continue. ACCESS_COARSE_LOCATION Permission required. ");
        } else {

Also there's a typo in the log message. It should be "FINE", not "COARSE".

@Riadzebra
Copy link

Thank you for the feedback
Typo log message has been noted and will be fixed.
Removing the location permission, little more investigation is needed. Since we use some location APIs to work on BLE packet processing and officially still supporting android 11.

@Riadzebra
Copy link

Typo log message (Change ACCESS_COARSE_LOCATION to ACCESS_FINE_LOCATION) was included in v2.6.16.0 https://www.zebra.com/us/en/support-downloads/software/developer-tools/scanner-sdk-for-android.html

@sproctor
Copy link
Author

sproctor commented May 2, 2023

This check should be done in the application. Having it in the library limits application developers. It's checked in the demo application. Removing this check from the library should not negatively impact devices running Android 11.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants