nativescript-community / nativescript-community/ble
Scan throws error on android 13+
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 202
- Forks
- 79
- PR merge metrics
- No merged PRs in 30d
Description
It seems that android 13+ devices need an additional permission for BLE scan.
Error log:
Error: java.lang.SecurityException: Permission Denial: starting Intent { act=android.bluetooth.adapter.action.REQUEST_ENABLE cmp=com.android.settings/.bluetooth.RequestPermissionActivity } from ProcessRecord{e7d2f4d 5142:com.fuelics.mobile.alpha/u0a159} (pid=5142, uid=10159) requires android.permission.BLUETOOTH_CONNECT undefined
Google claimed that this permission was useful for devices that were already paired in API 31 https://developer.android.com/develop/connectivity/bluetooth/bt-permissions. That doesn't seem to be the case anymore.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the Android BLE scan and permission entry point, then reproduce the reported SecurityException on an Android 13+ device. Done means the scan flow no longer throws the BLUETOOTH_CONNECT denial. No file or test is named in the issue, so locate the relevant implementation and existing test coverage first.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, typescript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100