• 5,784,585
    REGISTERED
  • 51,401
    ONLINE NOW

C#: The Future of Android?

C#: The Future of Android?

If you haven’t heard, Google and Oracle are locked in a dispute over the Android OS and its use of Java code. This struggle could have strong repercussions for the world’s most popular mobile OS.

With that realization Xamarin, makers of the open-source and cross-platform mobile .NET application development platform Mono, sat down almost a year ago to look at the Android platform and see what could be done to improve battery life and Android application performance. Eventually their team came to the conclusion that C# offered a more robust base than Java, with fewer coding limitations and faster performance. In their words:

Over and over we came back to the basics: Dalvik is a young virtual machine, it is not as performant or tuned as Mono and suffers from many of Java’s performance limitations without the benefit of the high-end optimizations from Oracle’s HotSpot. One crazy idea that the team had at that dinner was to translate Android’s source code to C#. Android would benefit from C# performance features like structures, P/Invoke, real generics and our more mature runtime.

Although nothing happened back in July, this idea stuck in the back of our minds.

Fast forward a few months: Mono for Android is doing great, and we are starting to think again about improving our own product’s performance on Android. What if we could swap out Java with faster C# and get rid of various Dalvik limitations in the process? Could we create an Android phone completely free of Java, and free of the limitations of the Dalvik VM?

We decided it was crazy enough to try. So we started a small skunkworks project with the goal of doing a machine translation of Android from Java to C#. We called this project XobotOS.

Xamarin then began the XobotOS project to port Android 4.0 to C# using their open-source tool Sharpen. While they no longer are focusing on XobotOS, they have open-sourced the project on GitHub. Could this be the answer to Google’s current legal battles? Given the depth of the necessary ecosystem changes, this seems unlikely. However, it presents an interesting possibility for those willing to tinker with the open-source code above.

_________
Want something on the XDA Portal? Send us a tip! -- Join us for xda:devcon 2014!
Advertisment
Advertisement

XDA TV: Most Recent Video

Buy/Sell on Swappa

  • Nexus 5 (Unlocked) buy | sell
  • Galaxy Note 3 (T-Mobile) buy | sell
  • HTC One M7 (Verizon) buy | sell
  • Galaxy S 5 (Unlocked) buy | sell
  • Nexus 7 2013 buy | sell
  • Swappa is the official marketplace of XDA