Forum Libraries, Components, and Plugins
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Has anyone been able to get Flic 2 Bindings working in Xamarin?

Hello,

I am trying to integrate Flic 2 buttons to work with my Xamarin app. Flic only offers native code that requires you to create Xamarin bindings in order for it to work with Xamarin. I created these bindings and they work fine for Flic 1 buttons, however I am having trouble with hooking up the bindings with the Flic 2 code since they changed a lot. I was wondering if anyone was able to get this working?

Tagged:

Best Answer

  • Calico_JackCalico_Jack Member ✭✭
    Accepted Answer

    I got it working. My issue turned out being including properties from the extended Java.Lang.Object that I did not need.

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    I find there is an existed binding for Xamarin here:
    https://github.com/johnnyjr/FlicLib.Sharp

    however I am having trouble with hooking up the bindings with the Flic 2 code since they changed a lot

    Could you please share what the trouble is?

  • Calico_JackCalico_Jack Member ✭✭

    @LandLu that library is for the Flic 1 bindings. I am not having problems creating the bindings, but I am having problems trying to use the bindings on the C# Xamarin end. There is no single problem, its more of the entire thing is a problem because I cant seem to get it working and was asking if anyone has experience with the Flic 2 bindings that could reach out. For example, the Flic2ScanCallback in the Flic documentation (https://github.com/50ButtonsEach/flic2lib-android) has overrides and such within the call, but on the C# binding end I only get the IFlic2ScanCallback interface, that I need to implement on my own, which requires a handle and such that isnt detailed in the documentation. I think its the programming language translation into c# which is throwing me off.

  • Calico_JackCalico_Jack Member ✭✭
    Accepted Answer

    I got it working. My issue turned out being including properties from the extended Java.Lang.Object that I did not need.

Sign In or Register to comment.