AmiNadimi
AmiNadimi

Reputation: 5715

use android modules in xamarin project

How do You use pre-built module codes from Maven or j-center Repositories in an android xamarin project?

To be more specific:

I want to use this free module as a date picker :

https://github.com/alirezaafkar/SunDatePicker

I have read this page :

https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/

But since this module is not just a jar file , I think the method explained in the page wont be useful.

Upvotes: 2

Views: 985

Answers (1)

AmiNadimi
AmiNadimi

Reputation: 5715

Just create an .aar library project in Android Studio, add the SunDatePicker as a gradle dependency and build it. Then create a Xamarin.Android binding project to place a C# wrapper on the .aar. I do it all the time, works really well.

Thanks to SushiHangover.

Upvotes: 2

Related Questions