Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mono for Android - How It works? [closed]

I found that Xamarin apps run in Mono runtinme on Android, and things get passed to Dalvik. But what I can not understant is how is it possible that app is running in Mono, but normal app are executed in Dalvik. What is so different in Mono app that it runs in Mono and not Dalvik.

How can Mono be on the same level as Dalvik? Mono should be somehow stored in the app which runs in Dalvik, I think.

Please explain to me how is it possible, and sorry for my bad language.

Architecture

like image 781
zdarsky.peter Avatar asked May 10 '14 03:05

zdarsky.peter


People also ask

How does Mono work on Android?

Runtime: The Mono for Android runtime is an application that runs on the Linux kernel in the Android stack. It interprets the Mono byte code and handles communication with the Dalvik runtime for calls to native Android APIs.

Can Android run mono?

The Mono runtime has been ported to the Android OS. The Xamarin Platform is the edition of Mono for Android that provides access to all of the native Android APIs. It is available both as part of Microsoft Visual Studio, or as an open source project.

What is the Mono runtime?

The Mono runtime contains a code execution engine that translates ECMA CIL byte codes into native code and supports a number of processors: ARM, MIPS (in 32-bit mode only), SPARC, PowerPC, S390 (in 64-bit mode), x86, x86-64 and IA-64 for 64-bit modes.


1 Answers

An app developed by xamarin has the mono runtime which it takes with it onto the device. The app apk contains .net intermediate code, p-code, which obviously is not Dalvik understandable.

Xamarin.Android developers access the various features in the operating system either by calling into .NET APIs that they know (for low-level access) or using the classes exposed in the Android namespaces which provides a bridge to the Java APIs that are exposed by Dalvik.

http://docs.xamarin.com/guides/android/under_the_hood/architecture/ this is where you can find more details.

like image 84
Gaurav Deochakke Avatar answered Oct 24 '22 06:10

Gaurav Deochakke