views:

41441

answers:

13

Now that the G1 with Google's Android OS is now available (soon), will the android platform ever support .Net?

+58  A: 

Yes, it will be possible and it won't be that difficult. All what's needed at this point to start with is some kind of converter that will turn MSIL into Dalvik bytecode. Since both formats are open-sourced and well documented, there won't be any problem with it.

So, writing Android applications in C# or VB.NET will be possible, question is how much of .NET framework standard libraries will be supported. But that's another issue.

Oscar Reyes wrote:

I'm pretty sure if google hand ANY interest in .net, they would've design something while Android was in the first stages, not now when they are in production stages. I don't mean it is not possible, what I'm saying is they're not interested. Maybe in mmm hhhh 10 yrs.

Actually what they've already designed is very compatible with Java and .NET

They can't do everything at once, but if you look into Android SDK, there is a tool called dx. This tool converts Java bytecode into Dalvik bytecode, so in other words, you can run programs written in Java on Android with no effort today. Now the same tool is needed for .NET.

Considering how similar .NET and Java are, it's really a matter of time.

ddimitrov wrote:

The .Net->Java->Dalvik translation can be done even now (http://dev.mainsoft.com/), but I think you underestimate the lack of .Net libraries. Of course somebody can port Mono, but it's definitely a non-trivial effort.

No need to port Mono. Android already has VM and some basic API. All what's needed is CIL->Dalvik converter and tiny .NET wrapper for Android API (and maybe some basic implementation of some standard .NET classes). That's it.

Update: Mono works on Android as Miguel pointed out but I need to say that it's almost impossible for average person to get it work on their phones. I still wonder why Google went ahead to develop their own runtime environment if they could easily plug-in Mono in the first place.

While I like Mono very much, small companies aren't going to bet their future on it unless some bigger ones put some weight behind. I wonder why Google didn't want to use Mono as its primary development platform for Android. Maybe that's something Miguel could know more about...

lubos hasko
Yes, we never know... perhaps, perhaps... Well make it 4 yrs instead of 10 ... :P
OscarRyz
I don't agree. Everything you say IS technically possible, but I think you underestimate the work needed by an order of magnitude. It's always easy to put together a proof-of-concept like a crosscompiled hello word in a few hours. But to setup wrappers for all classes is A LOT of work.
Brian Schimmel
Check out the video that Sirish Kumar has linked to: http://youtube.com/?v=s8nMpi5-P-IIt shows how much work is to be done.
Brian Schimmel
@Brian, video you've posted is about iPhone not Android.
lubos hasko
Well, given Google's Java affinity it's not too surprising that they *didn't* go for .NET with this. Yes, using Mono might be feasible but I'm almost sure Google would avoid using .NET with similar zeal as Microsoft would avoid using Linux.
Joey
"small companies aren't going to bet their future on it unless some bigger ones put some weight behind it." Novell already sponsors it. And Microsoft supports the derivative project Moonlight both by providing codecs and test suites.
sblom
A: 

Android is open source, .net is not, they're kind of incompatible in nature ( not technologically but in "philosophy" )

Android has an Apache style license, that mean that anyone can do what they want with the source code, so if there is a group of very inspired and talented geeks, the .net support may be done outside google control in a parallel project. Of course I think none of the coders with enough knowledge, time ( and lets face it money ) will think in start this subproject by them selves and they will focus on current Android development as it is.

Since .net is NOT open source, the integration may be done only under Microsoft sponsorship ( because at difference of Mono, it's not about to create a new JVM -oops I mean CLI- ) Well probably someone think in creating the port.

So although it is human possible , don't expect this will come from Google nor Microsoft. If this ever happen ( and I already say it won't ) it will be from someone as Miguel de Icaza.

Perhaps here is the next ggrrrrreat open source project.

EDIT 22 jan 2009

I was about to eat my own answer but in a second read I can argue that I said:

Not from Google or Microsoft[...] but someone as Miguel de Icaza

And there it is, a few weeks later Miguel providing links about the progress of Mono on Android.

:)

Shoot me now!!!

OscarRyz
Heard of Mono? Just because it's not available now doesn't mean it won't be ever.
Robert P
The limitation is not technical, but business nature. Microsoft - Google. Perhaps from a third party
OscarRyz
I agree, to a point, but a blanket NO is too much.
jcollum
You know, I think that you can get the "Peer Pressure" badge for deleting your own post having a score of -3 or lower.
Scott Fletcher
+2  A: 

A modified port of Mono is also entirely possible.

akdom
@akdom, do you have experience with porting of software from desktop/server OS to embedded? I have some mobile development experience (Java and Brew) and IMHO, you are grossly underestimating the effort. It might be possible, but deffinitely not in the next 3 years.
ddimitrov
@ddmitrov: The question was whether the android platform with EVER support .NET, not whether it will within the next three years. I was merely positing that since Mono is an open source implementation of .NET it would be easier to construct an android version of Mono than to start from scratch.
akdom
+3  A: 

Check this out http://www.xmlvm.org/overview/ . I think this is possible. May be can also check this video http://youtube.com/?v=s8nMpi5-P-I

siri
I like that answers. It shows that it is possible, but if you watch that video, it also shows how many problems are still open to solve and how much work is behind all that.
Brian Schimmel
+2  A: 

.NET compact framework has been ported to Symbian OS (http://www.redfivelabs.com/). If .NET as a 'closed' platform can be ported to this platform, I can't see any reason why it cannot be done for Android.

KevinD
Have you used the compact framework? I do every day at my work and a mono port in the form of MonoDroid will be heaps better.
trampster
+1  A: 

You're more likely to see an Android implementation of Silverlight. Microsoft rep has confirmed that it's possible, vs. the iPhone where the rep said it was problematic.

But a version of the .Net framework is possible. Just need someone to care about it that much :)

But really, moving from C# to Java isn't that big of a deal and considering the drastic differences between the two platforms (PC vs. G1) it seems unlikely that you'd be able to get by with one codebase for any app that you wanted to run on both.

jcollum
A: 

In my opinion, it would be technically possible to convert the CLI Bytecode to Dalvik, and to write wrapper classes for some core features such as Collections, File access, etc., even it would be hard work.

But a .NET desktop application ran on android would feel alien, as it would have a classic Windows-Like GUI which is not very usable on a touch device. If, on the other hand, you were to code an android-like GUI in .NET, you would need another set of wrappers (notice that wrapping is just the other way round opposed to the wrappers mentioned above).

I'm not sure if a .NET mobile application would feel native on android, but I'd guess it wouldn't.

Maybe you're interestend in another approach: You can write your application in the Java language. You can then compile it to .NET via Microsoft J# (I know it's discontinued but you can still download and use it) and use the same Java code on android. Again, that's for the core classes aka business logic and again you would have to write tow GUIs. Maybe you can tages J2ME as well, which you will not be able to do if you use .NET.

Brian Schimmel
no it wouldn't your are assuming that win forms would be ported, which is a really bad idea, MonoDroid will have bindings to the android UI widgets, so it will look exactly like a native android app, the user need not even know it is running on MonoDroid
trampster
Also a CLI Bytecode to Dalvik is a bad idea, the mono runtime and VM already work on ARM, making it run on android will not be a problem. And seeing as mono is JIT compiled and Dalvik is interpreted. Running on the mono runtime will be much faster.
trampster
+168  A: 

Mono now works on Android thanks to the work of Koushik Dutta and Marc Crichton.

You can see a video of it running here: http://www.koushikdutta.com/2009/01/mono-on-android-with-gratuitous-shaky.html

And you can get the instructions to build Mono yourself here: http://www.koushikdutta.com/2009/01/building-mono-for-android.html

You can get a benchmark comparing Mono's JIT vs Dalvik's interpreter here: http://www.koushikdutta.com/2009/01/dalvik-vs-mono.html

And of course, you can get a pre-configured image with Mono here (go to the bottom of the post for details on using that): http://www.koushikdutta.com/2009/01/building-mono-for-android.html

miguel.de.icaza
Well, I said, not MS nor Google but probably Miguel and here you are ( well I know it wasn't you, but somehow close ) Great links Miguel. Do you think Google would ever support this? I mean they taking the port under their hood? :) If I could I would downvote my own answer :)
OscarRyz
Uhm, thats "only" running in debian running on the same hardware. Not quite ported to "android" in my opinion, but sounds like its not a big problem to port it completely it seems.
sandos
I'm wondering, has there been any talk with Google to make this easier to install? Perhaps put it up as a free download from the Market? Allow .Net apps to be put on the market?
csauve
How a bout an article like mono-project.com/Android ?
abatishchev
+1  A: 

.NET and Mono are great environments, with many tools and and excellent skills base of people who know how to use them.

I think Mono has the opportunity to be the mobile cross-platform development environment of choice, seeing as they are the only alternative to Objective-C on the iPhone and should be portable to Android, and .NET is already on Windows Mobile.

I'm really hoping to see a solid implementation of Mono on Android, with wrappers for the Android API as with Monotouch, and would be prepared to pay for it since I'm not in a position to do it myself.

Peter
+15  A: 

Miguel de Icaza's announced on his blog on the 17th of Feb 2010 that they are starting work on mono for android which will be called MonoDroid.

This will be similar to MonoTouch on the iphone but for android instead.

It will provide binding to the android UI, so apps will look and feel live native android apps. This will require you to write an android specific UI.

You will however be able to reuse you existing lower level libraries without the need to recompile.

trampster
The Monodroid beta is now available to people that signed up for the beta program early.
Damian Mehers
yes it is currently in private beta, which I did sign up for but so far have missed out on an invitation :(
trampster
+5  A: 

Since this is one of the first links on Google when search for Android and .net support, it is only fitting to post this here.

The mono project is working on a SDK to develop Android applications using CIL languages such as C#. The down side is it will be a commercial product.

http://go-mono.com/monodroid/

Tony
A: 

.NET for Android seems like a real possibility to me. There is news that Microsoft will release proper Silverlight for Android- Never underestimate the advantages to Microsoft for putting the boot into Apple. A smartphone that is faster, more feature rich, faster development lifecycle, impressive hardware, Flash & Silverlight as a standard installable.

Microsoft has a vested interest in improving Android, and at the same time, applications will be devloped for Silverlight on Android will also work on Windows Phone 7 OS with multi-touch, GPS, etc., etc.

Mark
+2  A: 

There is Mono for Android, the .NET framework ported for Android. And there is MonoDroid, a development stack for using C# and the core .NET APIs to develop Android-based applications. MonoDroid Preview 1 has been released a couple of days ago.

MonoDroid