[Bug]: Bluetooth Nearby Connections fails unconditionally on Android 12 and below ("no permission granted")

Open Beginner friendly
#79 1 comment 0 reactions 0 assignees View on GitHub

@jShubh-AD is already working on this.

Since Nov 20, 2026.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
74/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
android, dart, flutter
Domain
mobile

Research direction

Open the BluetoothTransportService and read ensurePermissions(), where Permission.nearbyWifiDevices is requested alongside the Bluetooth permissions and the results are collapsed with statuses.values.every(...). Check how the service can learn the Android API level (the project's permission_handler setup and any device-info dependency in pubspec.yaml) so that nearbyWifiDevices is only requested on API 33+. Done means pairing succeeds on an API 31/32 emulator as well as on Android 13+, with the permission map no longer failing on older devices.

Written by the indexing model from the issue text.

Description

bug
Bug Description

In BluetoothTransportService.ensurePermissions(), runtime permissions are requested indiscriminately without checking the device's Android SDK version. Specifically, Permission.nearbyWifiDevices is requested unconditionally across all Android versions.

Because NEARBY_WIFI_DEVICES was only introduced in Android 13 (API 33), requesting it on Android 12 (API 31/32) or Android 11 and below causes permission_handler to return PermissionStatus.denied. As a result, statuses.values.every(...) evaluates to false, rendering Bluetooth pairing completely unusable on Android
≤ 12.

Steps to Reproduce
  1. Run the app on an Android 12 device or emulator (API 31 or 32).
  2. Navigate to Invite Friends or any screen initiating Bluetooth discovery/advertising.
  3. Toggle on Bluetooth pairing.
  4. When prompted by the system, tap "Allow" / "While using the app".
  5. Expected: Bluetooth advertising/discovery starts.Actual: Fails immediately with BluetoothPermissionDenied / "no permission granted".
Logs and Screenshots
Screenshot_2026_1120_171337 Screenshot_2026_1120_171359
Environment Details

OS: Android version ≤ 12
App Version: 1.0.2+3
Branch: dev
Flutter Version: 3.44.0 (or 3.44.2)
Dart SDK: 3.12.0

Impact

Critical - Application is unusable

Code of Conduct
  • I have joined the Discord server and will post updates there
  • I have searched existing issues to avoid duplicates
Dominant language
Dart
Stars
20
Forks
41
Avg merge
3d 12h
Merged PRs (30d)
2

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from StabilityNexus/Zplit

All issues in StabilityNexus/Zplit

Similar issues

More Dart issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.