Skip to content

[Android] Bluetooth permission required twice #884

Open
@c15yi

Description

@c15yi

🐛 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-permission entry at all.

Setting the line twice like this however works:

<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH"/>

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.xml the Bluetooth permission is only added once, which leads to the error above.

Configuration

Phone: Pixel 5 with Android 12

Version: 10.0.0

Platform:

  • 📱 iOS
  • 🤖 Android

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work list.platform: androidIssue is related to the Android platform.type: bugSomething isn't workingtype: documentationUpdate to the documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions