libcommon icon indicating copy to clipboard operation
libcommon copied to clipboard

Create bindings on this library in Xamarin

Open laheller opened this issue 7 years ago • 2 comments

Hi!

Was anybody able to successfully create Xamarin bindings for libcommon? I mean based on this article.

laheller avatar Jan 24 '19 13:01 laheller

Ive managed to compile using a Xamarin bindings based on some info from this project, however it didnt support the device im compiling for: https://github.com/BigMango/XamarinUVCCamera/tree/master/Poya.Lib.Device.Camera.UVCCamera.Common

I only needed a few classes from this library so it was easier to tell Xamarin to remove the classes that were causing compile errors

For version 4.1.1 this worked for me in the Metadata.xml

<metadata>
  <attr path="/api/package[@name='com.serenegiant.media']/interface[@name='IRecorder']" name="managedName">IRecorder</attr>
   <remove-node path="/api/package[@name='com.serenegiant.utils']/class[@name='CollectionMap']" />
  <remove-node path="/api/package[@name='com.serenegiant.glutils']/class[@name='RendererHolder']" />
  <remove-node path="/api/package[@name='com.serenegiant.mediaeffect']" />
  <remove-node path="/api/package[@name='com.serenegiant.utils']/class[@name='ResourceHelper']" />
  <remove-node path="/api/package[@name='com.serenegiant.utils']/class[@name='XmlHelper']" />
  <remove-node path="/api/package[@name='com.serenegiant.widget']" />
</metadata>

Hope this helps others

iwarp avatar Jun 25 '20 20:06 iwarp

@iwarp Thank you!

laheller avatar Jun 26 '20 18:06 laheller