Forum Xamarin.Android

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='']]" 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.

Sign In or Register to comment.