randdusing / cordova-plugin-bluetoothle

Bluetooth Low Energy Phonegap Plugin
803 stars 353 forks source link

Promises #415

Open r-barnes opened 7 years ago

r-barnes commented 7 years ago

Are there any plans to modify this library to use promises?

In the worst case, a simple wrapper around the existing library would capture much of the functionality but, imo, would make it considerably easier to work with.

I'd be game for contributing a patch if that was of interest.

randdusing commented 7 years ago

It's something I would like to do, but I'm strapped for time at the moment. It should be pretty simple if you follow the Angular wrapper's logic. The only part I'm not sure about is how to handle the connect and subscribe calls that have multiple callbacks.