[Monodroid] Other Android Mono ports

Jonathan Pryor jpryor at novell.com
Fri Mar 4 15:47:21 EST 2011


On Mar 4, 2011, at 3:27 PM, Matthew Groves wrote:
> I was giving a MonoDroid talk recently, and a question came up about other implementations of Mono on Android.  I did some Googling around, and there appears to be a couple (not nearly as polished or well-supported as MonoDroid of course).
> 
> The question was: "what's to stop me from using one of those or doing my own Mono-on-Android implementation"?  Essentially, do I *have* to use MonoDroid to use Mono on Android.  I didn't really have a good answer.

The theoretical answer is: nothing. The only real constraint is the LGPL, so if you build Mono yourself, bundle libmono.so with your app, and provide some means of abiding by the LGPL, you're golden. (Android makes this fairly easy by actually supporting shared libraries, unlike iOS, but it's still something to keep in mind.)

The practical answer is that, while it's theoretically easy to do the above, you're still left with creating some mechanism to interoperate with the Android class libraries (whether that be the JNI-heavy approach of MonoDroid, a simpler "all UI code in Java, and dispatch to managed code through some mechanism," or something else) and dealing with all of the pitfalls that entails (cross-GC collections and object graphs, anyone?).

As an insider, the biggest complexity with MonoDroid hasn't been getting the JIT and class libraries working on Android (and koush did much of that work before we ever really started -- thanks koush!). The biggest complexity has been binding the Android APIs so that you can "sanely" use them from C# in a reasonably straightforward fashion, and fixing the tons of bugs and platform limitations that show up. (For example, we're on our 4th "initialize the mono runtime" implementation. Then there's MIke's _months_ of work on getting the GC to work sanely. Plus the necessary tooling so that C# code can subclass Android classes and implement Android interfaces. Plus...)

So please, feel free to reimplement the several man-years of effort we've put into MonoDroid so far. :-)

Finally, there's the licensing issue: many customers don't want to have to worry about LGPL requirements, and MonoDroid's inclusion of a commercial license allows them to not worry about it.

 - Jon



More information about the Monodroid mailing list