Recommended Posts

Android ported to C#

Oracle and Google are currently in a $1 billion wrestling match over Google?s use of Java in Android.

But Java is not the only way to build native apps on Android. In fact, it?s not even the best way: we have been offering C# to Android developers as a high-performance, low-battery consuming alternative to Java. Our platform, Mono, is an open source implementation of the .NET framework that allows developers to write their code using C# while running on top of the Java-powered operating system, and then share that same code with iOS and Windows Phone.

Unlike Sun with Java, Microsoft submitted C# and the .NET VM for standardization to ECMA and saw those standards graduated all the way to ISO strong patent commitments. The .NET framework is also covered by Microsoft?s legally binding community promise.

Last July when Xamarin was getting started, we got our team together in Boston to plan the evolution of Mono on iOS and Android. After a day of kayaking in the Charles River, we sat down to dinner and turned our attention to how we could improve the performance and battery life of applications on Android, and make our own Mono for Android even better.

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.

Source and full article: Xamarin blog

  • Like 3
Link to comment
https://www.neowin.net/forum/topic/1074415-android-ported-to-c/
Share on other sites

  On 02/05/2012 at 09:00, wrack said:

Android develpment using C#? Count me in.

xamarin had an sdk for Mono on Android (and iOS) for quite a while now - I never actually figured out if you had to pay the license fees to develop. I think what they did here is translate the Java layer in Android to C#.

Also

  Quote

While Xamarin does not intend to develop XobotOS further, it is, like Android, open source, published under the Apache license. With this foundational work done, a lawsuit-averse developer?or even Google itself?could make the first moves towards building a Java-free Android operating system

They have left it for Google to decide: **** Java (and the lawsuit) and go with XobotOS or stick with Java?

The winner of all this? WP7. Alot of things (if Google goes C#) would then be very simple to port to WP7 (and visaversa).

I hope Google goes C# but I dont see it happening at all.

I really didn't expect to hear this at all!

Now considering that it's been done, the benchmarks kill existing Android, and the ongoing littigation with Oracle, I wonder if Google are kicking themselves about not choosing .NET as their platform to begin with?

  On 02/05/2012 at 11:37, htcz said:

Having said that (and cleaned myself up), there are issues: No current Android app would run on it. This would:

A) Cause a massive money lost of having to report all the apps into C#

B) Having some devs only write C# Android apps that would run on XobotOS.

Solution: They have to make a C# virtual machine that can run Java apps.

Yeah, you already have Monodroid, now they just need to embrace the C# port and release Javadroid. :p

  On 02/05/2012 at 11:48, Depicus said:

Mono does not come without issues, maybe why Ubuntu dropped it. It also look like a $900 developer cost which for business is fine but for hobby developers might be a bit of a hurdle.

Nice idea however.

AFAIK, Ubuntu dropped mono from the default install because the only applications that needed it (Tomboy notes and a media play I can't recall the name of) aren't in the default install as of Pangolin, hence there's no need to include it by default.

----------------------------------------

Google, IMO wouldn't go with Mono over Dalvik, because if they get stung by Oracle over Dalvik, they're not going to jump into bed with Xamarin and risk more litigation for using third party software. Shame really because those benchmarks are very impressive, although I would like to see some real-world benchmarks, as those tests have been picked because they re-implement very specific features that Dalvik sucks at compared to Mono.

  On 02/05/2012 at 12:14, Majesticmerc said:

AFAIK, Ubuntu dropped mono from the default install because the only applications that needed it (Tomboy notes and a media play I can't recall the name of) aren't in the default install as of Pangolin, hence there's no need to include it by default.

----------------------------------------

Google, IMO wouldn't go with Mono over Dalvik, because if they get stung by Oracle over Dalvik, they're not going to jump into bed with Xamarin and risk more litigation for using third party software. Shame really because those benchmarks are very impressive, although I would like to see some real-world benchmarks, as those tests have been picked because they re-implement very specific features that Dalvik sucks at compared to Mono.

Its very difficult that Java beats C# at almost anything. C# takes inspiration from Java and improves it.

java seriously needs to die already, if it weren't for minecraft I wouldn't be using java at all

I really hope something comes of this, because if those benchmarks are anything to go by, this would mean great things for android's future

@ the person that mentioned the apps issue: so what if many apps need converted to work again, it'd be a small price to pay for an over all improvement of this magnitude

and if the dev of the app really cares then it won't take long to convert, that'll be the true test right there

This topic is now closed to further replies.
  • Posts

    • inception horn at max volume every time you copy.
    • Doesn't Windows have I build clipboard history? Win+V
    • Quantum computer does something for first time, creates "certified truly random" numbers by Sayan Sen Image by Ron Lach via Pexels A group of researchers from JPMorganChase, Quantinuum, Argonne National Laboratory, Oak Ridge National Laboratory, and The University of Texas at Austin has reached a major milestone in quantum computing. In a new paper published in Nature, they describe how they used a 56-qubit quantum computer to generate random numbers and then proved those numbers were truly random using powerful classical supercomputers. This achievement, called "certified randomness," could be useful in areas like cryptography, privacy, and fairness. Certified randomness means the numbers are not just unpredictable, but also freshly created and mathematically verified. Classical computers can’t do this on their own. They usually rely on hardware random-number generators, which can be tampered with. But with this new method, even if someone tried to interfere with the quantum computer, they wouldn’t be able to fake the randomness and still pass the certification. The idea behind the protocol was first proposed by Scott Aaronson, a computer science professor at UT Austin. He worked with his former postdoctoral researcher, Shih-Han Hung, to support the experimental team. “When I first proposed my certified randomness protocol in 2018, I had no idea how long I’d need to wait to see an experimental demonstration of it,” Aaronson said. “Building upon the original protocol and realizing it is a first step toward using quantum computers to generate certified random bits for actual cryptographic applications.” To carry out the experiment, the team accessed Quantinuum’s System Model H2-1 quantum computer over the internet. They used a method called random circuit sampling (RCS), which is known to be extremely hard for classical computers to simulate. The process had two main steps. First, the researchers sent the quantum computer a series of challenge circuits created from a small seed of randomness. The quantum computer had to solve these challenges by picking one of many possible answers at random. Then, in the second step, classical supercomputers checked the results to confirm the randomness was real. The team used several supercomputers with a combined performance of 1.1 × 10¹⁸ floating-point operations per second (1.1 ExaFLOPS) to certify 71,313 bits of entropy. This means they proved that the random bits couldn’t have been generated by classical methods, at least not under realistic conditions and assumptions. “This work marks a major milestone in quantum computing, demonstrating a solution to a real-world challenge using a quantum computer beyond the capabilities of classical supercomputers today,” said Marco Pistoia, Head of Global Technology Applied Research at JPMorganChase. Quantinuum had upgraded its H2 system to 56 qubits in June 2024. Thanks to its high accuracy and ability for any qubit to connect with any other, the system was able to perform RCS far better than previous machines. This upgrade, combined with Aaronson’s protocol, made the breakthrough possible. “Today, we celebrate a pivotal milestone that brings quantum computing firmly into the realm of practical, real-world applications,” said Dr. Rajeeb Hazra, President and CEO of Quantinuum. “These results in quantum computing were enabled by the world-leading U.S. Department of Energy computing facilities at Oak Ridge National Laboratory, Argonne National Laboratory and Lawrence Berkeley National Laboratory,” said Travis Humble, director of the Quantum Computing User Program at ORNL. While quantum computers have shown they can outperform classical ones in theory, turning that power into something useful has been a challenge. This experiment shows that quantum computers can now do something practical that classical computers simply can’t match. Source: University of Texas, Nature This article was generated with some help from AI and reviewed by an editor. Under Section 107 of the Copyright Act 1976, this material is used for the purpose of news reporting. Fair use is a use permitted by copyright statute that might otherwise be infringing.
    • I noticed when I click on the update button (from the desktop app), it says I'm still on the latest version, that does not give me access to ChatGPT five, and I do not see GPT-5 even in the web account either, despite being a pro customer.
  • Recent Achievements

    • First Post
      EzraNougat earned a badge
      First Post
    • One Month Later
      westDvina earned a badge
      One Month Later
    • Community Regular
      Bern@rd went up a rank
      Community Regular
    • Week One Done
      Joey Solo earned a badge
      Week One Done
    • Week One Done
      Vicente C Alves earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      711
    2. 2
      +FloatingFatMan
      201
    3. 3
      ATLien_0
      163
    4. 4
      Xenon
      130
    5. 5
      wakjak
      110
  • Tell a friend

    Love Neowin? Tell a friend!