Skip to content
New issue

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

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

Already on GitHub? # to your account

Android12 manifest declaration changes #1415

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions permission_handler_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 12.0.14

* On Android 12+, check for different Bluetooth declarations in the Android manifest.

## 12.0.13

* Updates the Android min SDK to 19 (from 16).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,19 @@ static List<String> getManifestNames(Context context, @PermissionConstants.Permi
break;

case PermissionConstants.PERMISSION_GROUP_BLUETOOTH:
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_SCAN)) {
permissionNames.add(Manifest.permission.BLUETOOTH_SCAN);
}
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_CONNECT)) {
permissionNames.add(Manifest.permission.BLUETOOTH_CONNECT);
}
if (hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH_ADVERTISE)) {
permissionNames.add(Manifest.permission.BLUETOOTH_ADVERTISE);
}
} else if (hasPermissionInManifest(context, permissionNames, Manifest.permission.BLUETOOTH)) {
permissionNames.add(Manifest.permission.BLUETOOTH);
}
break;

case PermissionConstants.PERMISSION_GROUP_MANAGE_EXTERNAL_STORAGE:
Expand Down
2 changes: 1 addition & 1 deletion permission_handler_android/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: permission_handler_android
description: Permission plugin for Flutter. This plugin provides the Android API to request and check permissions.
homepage: https://github.com/baseflow/flutter-permission-handler
version: 12.0.13
version: 12.0.14

environment:
sdk: ">=2.15.0 <4.0.0"
Expand Down
Loading