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.

Exposing Events in a Java Binding Library

I am working on exposing events in the metadata.xml for a Xamarin Java binding library project. The very first time I ever exposed an event using a command similar to the one shown below and it worked. But on subsequent builds and no matter what I try, it never generates any events for any of the set*Listener methods I attempt to set it for.

<attr path="/api/package[@name='com.mypackage']/class[@name='MyClass']/method[@name='setOnErrorListener' and count(parameter)=1 and parameter[1][@type='package.path.to.OnErrorListener']]" name="eventName">Error</attr>

I verified there is no warning about the path not being found. Plus I copied it directly from the generated class file in the obj folder. What am I missing? If you are trying to expose an event for a set*Listener property this is all you should have to do according to the Xamarin documentation.

Answers

Sign In or Register to comment.