How painful is that? I might consider that a tooling issue.
Ideally, you should be able to specify the java dependencies you want and get some magical interface file generated for you in C# that makes it so you don't have to think so much about the interop, or at least remove any tedium / boiler plate. If that's not there, then I'd say it's a tooling issue.
It's pretty painful. I love using Xamarin and don't often need to use a native library but when it comes up it is the worst part of the Xamarin experience. There is a tool to help the process on Ios ,objective sharpie, but it's not the easiest thing to use either.
Re:Xamarin for All
by migueldeicaza on Wednesday December 14, 2016 @01:58PM
(#13178656)
I have a team of developers that binds the most popular Android and iOS libraries. We bind the libraries that our users request.
If you have some of those that you would like us to do, we would love to help you. Anything to remove the friction from using C#.
What about those of us who like F# and want to use that? Are you supporting that as well?
Well if I can make requests, I was looking at OpenWebRTC in particular. :)
It's been a while, but I've had good luck using the "Bindings Library" project type to wrap native Java Libs. Sometimes I would have to build an intermediate Android project (using Eclipse or android studio) to proxy the calls, but it wasn't too painful. For iOS it's more difficult and a bit of a weak spot for the platform.
The tooling is actually pretty good. Now the problem is a lot of the libraries I want to use are native android/java which means doing a lot of C#/java interop.