Make a class implement a Interface using Android Bindings in Xamarin
<p>I'm developing an Android application using Xamarin. For this app, I'll need to use two <strong>.jar</strong> libraries. These libraries do <strong>exactly</strong> the same thing, the difference is only that one should be used in a production environmentand the other is for development usage.</p>

<p>One of the requirements for that application, is that it must have a configuration that the user can set, to specify the environment (Production or Development).</p>

<p>I need to interact with a class of those libraries (let's call it <code>Foo</code>). If I needed to create that class using C#, I would first create an interface named <code>IFoo</code> and then create the two classes implementing that interface, then I would use a <strong>factory</strong> to create the correct instance based on the preference that the user set. But the problem is that on the <strong>Java</strong> libraries, both of those classes inherith directly from <code>Object</code>, so my calling code will not be able to use an abstraction as I wanted.</p>

<p>I was wondering, if it's possible to use the <strong>Metadata transform</strong> to modify the generated code to make the classes implement an interface. I was able to make it work by modifing the generated code, but every time I recompile the project, I miss my modifications.</p>