capacitor-community / capacitor-community/bluetooth-le

`RequestBleDeviceOptions` does not correctly expose the UUID filtering of web

Open
#459 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
361
Forks
121
Avg merge
10d 45m
Merged PRs (30d)
2

Description

**Is your feature request related to a problem? Please describe.**
I want to filter for a device with multiple specific UUIDs, but specifying `services` will filter for UUID A or UUID B rather than UUID A and UUID B. If I also wanted this set of UUIDs to have a given name, through the `name` property, it would again be or rather than and.

**Describe the solution you'd like**
Change the API to better reflect the web API, maybe through another property on `RequestBleDeviceOptions` that maps closely to [`filters` of the web Bluetooth API](https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice#parameters). This means that you can make multiple individual filters, each with a set of conditions.

**Describe alternatives you've considered**
It could be that this is impossible, due to limitations of the APIs on other platforms. I don't know.

**Additional context**
https://developer.mozilla.org/en-US/docs/Web/API/Bluetooth/requestDevice

Contributor guide

Open the contributing guide

Research direction

Start by locating RequestBleDeviceOptions and comparing its current services and name behavior with the Web Bluetooth requestDevice filters described in the linked documentation. Then inspect how device filtering is implemented across the supported platforms and determine whether multiple AND-based filter groups can be represented consistently. Done means the API behavior or its platform limitations are clearly defined and covered by appropriate tests or documentation.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, mobile-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.