50ButtonsEach / flic2lib-android

Flic2 SDK for Android
Other
17 stars 8 forks source link

Unable to read button error #24

Closed dineshanchetty closed 1 month ago

dineshanchetty commented 2 years ago

hi there

we are connecting the button via an Ionic front end and are able ot register the device, but are having issues with reading the actions - please see below response image_2022_10_12T12_58_23_684Z

Emill commented 2 years ago

I'm not sure what you're trying to do. Are you using this library at all?

dineshanchetty commented 2 years ago

hi -
we are using the library referred to in this post - https://community.flic.io/topic/17858/ionic-development-with-flic-2?_=1665646982298

Emill commented 2 years ago

If you want to implement the protocol yourself then you should follow https://github.com/50ButtonsEach/flic2-documentation/wiki/Flic-2-Protocol-Specification.

But I really recommend that you call this flic2lib-android library instead from your ionic code.

dineshanchetty commented 2 years ago

hi, it not possible to call android native functions directly from ionic, hence the need for the plugin, we are able to register the device successfully, but are having problems only with reading the actions.

Emill commented 2 years ago

If ionic can't call native functions, then how does the plugin call the native BLE functions? You should be able to do the same, so instead of calling the BLE API directly, call the methods in this library instead.