Forum Xamarin.Android

Creating a bindings project for a jar file

ChrisXamaaugChrisXamaaug USMember
edited September 2015 in Xamarin.Android

Hi All,

Firstly, let me start off by saying that I am an asp.net pure C# developer with no Android experience and very new to the Xamarin bandwagon. Obviously! I am trying to leverage my C# knowledge for mobile app development which seems fascinating up until now.

I have been given an android sdk that belongs to ibeacon provider and I would like to use the same in my Xamarin android project. This was a .zip file that gave me the following files after extraction:

image

So I went back to reading this post only to realise that I had an aar file and that the post talked about a jar file. Then I found this post and managed to extract the jar file, rename it and use it in Xamarin to create a bindings project. I have followed the exact steps i.e.

1) Drop jar file in the jars folder
2) Set properties of the jar file to 'Embeddedjar'
3) Compile

I have got 3 errors as shown below but for the sake of crying out loud, I cannot figure out what to do with these errors. I have searched most posts on the net but I could not find a clear-cut concrete answer. The errors are:

image

The highlighted lines of code and decompiler (JD-GUI) views are:

MapControls
public partial class MapView : global::Android.Widget.FrameLayout, global::Com.Arubanetworks.Meridian.Location.MeridianLocationManager.ILocationUpdateListener, global::Com.Arubanetworks.Meridian.Maprender.IGLMapViewListener, global::Com.Arubanetworks.Meridian.Maps.MapControls.IMapControlsListener, global::Com.Arubanetworks.Meridian.Maps.Directions.Directions.IDirectionsRequestListener {

image

MeridianRequest
public unsafe MapImageRequest (global::Android.Content.Context p0, string p1, global::Com.Arubanetworks.Meridian.Requests.MapImageRequest.Type p2, global::Com.Arubanetworks.Meridian.Requests.MeridianRequest.IListener p3, global::Com.Arubanetworks.Meridian.Requests.MeridianRequest.IErrorListener p4)
: base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
{

public unsafe MapImageRequest (global::Android.Content.Context p0, string p1, global::Com.Arubanetworks.Meridian.Requests.MapImageRequest.Type p2, global::Com.Arubanetworks.Meridian.Requests.MeridianRequest.IListener p3, global::Com.Arubanetworks.Meridian.Requests.MeridianRequest.IErrorListener p4)
: base (IntPtr.Zero, JniHandleOwnership.DoNotTransfer)
{

image

I'm not really sure how to read this or handle this. Is there any one that can help or point me to resources that help me to understand this better.

Basically, all I'm trying to do is use that .aar file in Xamarin.Android

Thanks for any assistance.

Answers

  • GuidoKerstenGuidoKersten NLUniversity ✭✭

    Hi @ChrisXamaaug , at the moment I'm also busy trying to create a binding project for Meridian (IOS & Android), did you successfully finish yours? Could use a little help:)

  • Mark614Mark614 CAMember

    I too am interested in this SDK. You, have to set the .aar build property to LibraryProjectZip. but after that, it would seem that i am missing references upon build. have you guys solved this?

  • Hi @ChrisXamaaug or @GuidoKersten did you manage to finally create bindings for this SDK (I solved the android references by using EmbeddedReferenceJar, but I am stuck where the Metadata and I disagree about some EventArgs constructor definition (which is not even in the class where it was supposed to be)

Sign In or Register to comment.