jerdog · May 6, 2012 at 07:00 am

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!
TAGS:

jerdog

jerdog is an editor on XDA-Developers, the largest community for Android users. Jeremy has been an XDA member since 2007, and has been involved in technology in one way or another, dating back to when he was 8 years old and was given his first PC in 1984 - which promptly got formatted. It was a match made in the stars, and he never looked back. He has owned, to date, over 60 mobile devices over the last 15 years and mobile technology just clicks with him. In addition to being a News Editor and OEM Relations Manager, he is a Senior Moderator and member of the Developer and Moderator Committees at XDA. View jerdog's posts and articles here.
Chris Gilliam · Apr 26, 2015 at 12:00 pm · 4 comments

XDA Recap: This Week In Android (Apr 18 – 25)

Here in the digital XDA newsroom, we spend our days pouring over an average of 2,500 news items and forum threads every 24 hours. Only the most timely and interesting bits survive the editing process, but the portal's front page still sees weekly counts in excess of 100 posts. This is a glut of content to absorb, especially if following the news cycle isn't your full-time job. However, the tech world is vast, and the information must flow. With this in mind, please...

XDA NEWS
Mario Tomás Serrafero · Apr 26, 2015 at 11:00 am · 3 comments

Sunday Debate: Custom ROMs vs. Modular Tweaks

Join us in a fun Sunday Debate on Mods and ROMs. Come with your opinions and feel free to read some of our thoughts, then pick your side or play devil’s advocate to get your voice heard and engage in friendly discussion. You can read our food-for-thought or jump straight into the fray below!       PLEASE NOTE THIS DEBATE IS ABOUT FUNCTIONALITY AND PRACTICALITY AND NOT ANY IMPLICATIONS. LET’S AIM FOR FRIENDLY DISCUSSION Tweaking Android is what a...

XDA NEWS
Mario Tomás Serrafero · Apr 25, 2015 at 11:00 am · 2 comments

XDA Picks: Best Apps of the Week (Apr 17 – 24)

Apps are at the front and center of any smartphone experience, and with over a million apps on the Google Play Store and new apps being submitted to our forums every day, staying up to date on the latest apps and games can be a hassle. At XDA, we don’t discriminate apps - if it’s interesting, innovative, original or useful, we mention them. The XDA Portal Team loves apps too, and we usually share and discuss the latest app releases...

XDA NEWS
Share This