-
-
Notifications
You must be signed in to change notification settings - Fork 938
[Android] Bluetooth permission required twice #884
Copy link
Copy link
Open
Labels
P2Important issues not at the top of the work list.Important issues not at the top of the work list.platform: androidIssue is related to the Android platform.Issue is related to the Android platform.type: bugSomething isn't workingSomething isn't workingtype: documentationUpdate to the documentationUpdate to the documentation
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work list.Important issues not at the top of the work list.platform: androidIssue is related to the Android platform.Issue is related to the Android platform.type: bugSomething isn't workingSomething isn't workingtype: documentationUpdate to the documentationUpdate to the documentation
🐛 Bug Report
I only want to test whether Bluetooth is turned on or off (with
flutter_blue_plus), therefore I would assume that only<uses-permission android:name="android.permission.BLUETOOTH"/>would be sufficient.However, when I request Bluetooth permission I get
D/permissions_handler(27550): Bluetooth permission missing in manifest.The same is true when there is no
uses-permissionentry at all.Setting the line twice like this however works:
This only happens in combination with
flutter_blue_plus, but since the error message is reported by this plugin I wanted to start here.I actually can request the bluetooth state even without the permission at all on my device (android 12) but I guess it's necessary on older devices.
The problem with adding the permission twice is that Google Play refuses to accept the AABs.
Expected behaviour
Requesting/getting the permission result without error messages.
Reproduction steps
I created a small reproducing project here.
In the
AndroidManifest.xmlthe Bluetooth permission is only added once, which leads to the error above.Configuration
Phone: Pixel 5 with Android 12
Version: 10.0.0
Platform: