JuulLabs / able

Able: Android Bluetooth Low Energy library
Apache License 2.0
159 stars 11 forks source link

Any plans supporting BLE devices scan? #89

Closed FilippoVigani closed 3 years ago

FilippoVigani commented 4 years ago

It would be nice to be able to scan BLE devices in a Flow rather than having to work with ScanCallback.

twyatt commented 4 years ago

In short, yes. Although it likely won't come from this library.

We're actively working on a new library that essentially takes Able (which was designed around Android's BLE, hence the name Able: Android Bluetooth Low-Energy) and extends the design to be multiplatform.

The new library will likely supersede Able. In many ways it has a similar API surface but some usage needed to change in an attempt to provide as consistent of behavior as possible across the supported platforms.

On other platforms, the scanning/connecting is tightly coupled, so the new library will provide the functionality for scanning in addition to communication.

FilippoVigani commented 3 years ago

Sounds great, can't wait to try it out! Keep it up.

twyatt commented 3 years ago

We've begun process of porting over code from a proof-of-concept we wrote to the new open source BLE library.

Initial PR is up for the public API surface, community feedback is welcomed and appreciated. Expect additional PRs in the coming weeks for Apple, Javascript and Android targets.

https://github.com/JuulLabs/kable/pull/1

twyatt commented 3 years ago

Kable which will be superseding Able soon has scanning support and version 0.1.0 was recently released. 🎉