Menu

Creating Xamarin Android Bindings Library

Help
2016-05-30
2016-05-30
  • Otto Römmich

    Otto Römmich - 2016-05-30

    Hello,

    I am pretty new to Bindings Libraries in Xamarin. I know the basics and can get the examples to work.
    But with pocketsphinx I´m having real trouble.

    I compiled the pocketsphinx-android-5prealpha-nolib.jar with gradle and put it into the Class Library.
    But I´m getting errors like this one:

    'SegmentIterator' does not implement interface member 'IIterator.Next()'. 'SegmentIterator.Next()' cannot implement 'IIterator.Next()' because it does not have the matching return type of 'Object'
    

    If I resolve these in the Code myself I can compile the Bindings Library, but as soon as it´s referenced in an App Project, I get the following error in "RecognitionListenerImplementor.java".

    error: package edu.cmu.pocketsphinx does not exist
    

    So my question is, if someone did this with Xamarin Android and can give me directions on how to implement this correctly.
    Or if this is possible at all.

    Thanks!

     
    • Nickolay V. Shmyrev

      So my question is, if someone did this with Xamarin Android

      Yes, sure, many people did it

      and can give me directions on how to implement this correctly.
      

      You need to create the bindings for native library, not for Java library. You do not need jar at all, you can check documentation here:

      https://developer.xamarin.com/guides/android/advanced_topics/using_native_libraries/

      Or if this is possible at all.

      Yes, sure

       
  • Otto Römmich

    Otto Römmich - 2016-05-30

    I have seen a Bindings Library with a jar file for Xamarin.
    So I have been working in the wrong direction all the time...

    Thanks a lot for the fast answer.
    Implementing the native libraries shouldn't be a problem.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.