Reputation: 51
It's been two days that I seek on every forum, Docs, tuto, Blog etc..for an answer.
I began an Android app for my internship I develop it in xamarin C# because I don't know Java. Until recently everything was fine but now I need to integrate an SDK to use a POS (point of sale) with the app but this library is written in Java and I can't bind it with xamarin even if follow the docs or the tutor (I can't even debug).
There's someone here who already successfully bind a library which can help me?
I reached the point where I'm trying to learn quickly java to rewrite all the app.
here is the link to the SDK I need to integrate: https://github.com/sumup/sumup-android-sdk
Upvotes: 0
Views: 621
Reputation: 659
It is possible to consume Java libraries with Xamarin.Android projects. I used it to bind printer's Android SDK which was written completely in Java. At the end, you will produce .DLL that you can use and reference in any C# project.
However, I would recommend you to learn about .JAR bindings first. https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/
After that you can take a look at simple example of binding a .JAR to be sure what steps are needed. https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/binding-a-jar/
Also, bear in mind a lot of things can go wrong during this process. https://developer.xamarin.com/guides/android/advanced_topics/binding-a-java-library/troubleshooting-bindings/
Upvotes: 1