Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How to prevent automatic type change/conversion when generating Xamarin.Android binding library?

Is it possible to amend the metadata.xml or such so that during creation of binding library, Xamarin doesn't change the Java type of a method parameter to a .NET type?

When binding OpenCV, the FindContours function takes a util.List parameter in the original Java code. When binding it in Xamarin, the type is automatically converted to System.Collections.Generic.IList. I want to retain the original type. Following is both versions of the function.

How can we achieve this?

public static void findContours(org.opencv.core.Mat image, java.util.List<org.opencv.core.MatOfPoint> contours, org.opencv.core.Mat hierarchy, int mode, int method)

And then in Xamarin binding library

FindContours (global::OpenCV.Core.Mat p0, global::System.Collections.Generic.IList<global::OpenCV.Core.MatOfPoint> p1, global::OpenCV.Core.Mat p2, int p3, int p4)
Sign In or Register to comment.