BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News MonoDroid Bridges .NET with Android

MonoDroid Bridges .NET with Android

Leia em Português

Bookmarks

MonoDroid brings the whole Mono VM to Android, enabling .NET developers to write applications for Google’s mobile OS. Developers now can write applications targeting iOS, Android, and Windows Phone 7.

MonoDroid is a framework similar to MonoTouch enabling developers to write applications for the Android mobile operating system using the C# language and the Mono VM. The MonoDroid API contains the set of core libraries which are contained by Silverlight, except for the UI interface, and a set of bindings to the native Android Java API which are necessary in order to access device specific functionality such as various sensors, cameras, Bluetooth, etc.

In order to develop for Android on Windows, the Visual Studio Professional or better is needed along with a plug-in and an SDK. The SDK makes reference to the Android SDK which in turn uses the Java SDK. Development on Mac OS X is supported from Preview 10 with MonoDevelop, the cross platform IDE developed by Mono. Linux development is planned to be supported soon also via MonoDevelop.

MonoDroid opens the Android world to .NET developers. Using .NET and Mono, one could develop an application for Windows Phone 7, iPhone OS, and Android in the same time, but things are not as straightforward as developers might like. The UI APIs and specific device functionality is different from platform to platform, so one should not expect to write once and run everywhere the same code. The code needs to be clearly divided in business logic and UI-logic, the last part having to be rewritten for each mobile OS. Nonetheless, this is a step forward for .NET developers who want their applications to reach a market as wide as possible.

The roadmap for MonoDroid does not specify when version one will be available, but Miguel de Icaza mentioned they are “are working as fast and as hard as we can to complete Mono for Android.” MonoDroid 1.0 will use Mono 2.8, and will support C# 3.0, .NET 3.5, garbage collection, multi-threading, and other standard features such as LINQ. OpenGL will also be supported through OpenTK API, an object-oriented wrapper for OpenGL libraries. OpenTK is also included in MonoTouch, so OpenGL code can be shared between Android and iOS.

According to de Icaza, MonoDroid is used by the DeltaEngine, a cross-platform game development engine, to run games on iPhone, Android, Windows Phone 7, and XBox 360. Among other demoes, at CES 2011 NVidia presented a game, Soul Craft, running on LG Optimus 2X, an Android phone based on NVidia’a Tegra 2 dual-core chip. The game ran on MonoDroid.

MonoDroid is going to be a commercial product, the price not being available yet. As a reference point, the price for MonoTouch starts at $99 for the Student edition,  goes to $399 for the Professional, and ends up at $3,999 for a 5-seats enterprise license.

Rate this Article

Adoption
Style

BT