Hi,
im working on an app in our company that is based on xamarin.forms. The problem that im trying to solve for a while now is that i have to import custom views (camera ocr) that we received from an external company (as .aar library). My idea is to create a binding library and then create a custom renderer that will use the imported UI views. Im looking for any useful information for a week now .. and the only thing i found out is that importing native libraries is pain ..
So i have a few questions for experienced members ...
Thank you
Boris
Answers
You can binding this aar library, and use it in xamarin form.
For more details, check: https://docs.microsoft.com/en-us/xamarin/android/platform/binding-java-library/binding-an-aar
Besides, you can use
DependencyService
to invoke native platform functionality from shared code in Xamarin.Forms applications. For more details, you can check: https://docs.microsoft.com/en-us/xamarin/xamarin-forms/app-fundamentals/dependency-service/introductionHave you resolved your problem?
Hello Jezh,
Can you please advise if it is possible to render the view from native Java to Xamarin?
I have created an aar library from a jar file in Java. Then I created a binding library in Xamarin. Within the same solution, I created a Xamarin Mobile project. I was able to call the library within the Android project, but I failed in rendering the view into app.
I have been working for few days now and this is as far I was able to achieve. Could you please help me to see how can I fix this? I have sent you a private message with the project.
Looking forward to your advise.
Thank you in advance!
I appreciate your time and consideration.
Best regards,
Sheng