Android (a mobile operating system based on a modified version of the Linux kernel) was developed by the Open Handset Alliance, led by Google, and other companies – and has now garnered the interest of a million smartphone users. This book is for all android developers, whether you are a novice or an experienced pro. The beginner will find its carefully paced discussions and many examples especially helpful. Of course those who have already familiar with android programming are likely to derive more benefits from this book. After completing this book you will find yourself at a moderate level of expertise in Android programming from where you can take yourself to next levels.
Excerpt:
Android Run Time (ART)
This includes Java core libraries (consists of Java packages) and DVM (Dalvik Virtual Machine) ‒ which is responsible to run android application.
Java source code is compiled into Java bytecode which is stored within .class file and the Java bytecode is read, verified and executed by Java Virtual Machine (JVM). But in the case of Google’s Android operating system, DVM (Dalvik Virtual Machine) is used instead of JVM because JVM is designed for desktops and it is too heavy for mobile devices and moreover JVM takes more memory, runs and loads slower compared to DVM.
In case of desktop operating system, Java source codes ‒ are compiled to ‒ Java byte codes (which then stored in .class file) ‒ read, verified and executed by JVM.
In case of Google’s Android operating system, Java source codes ‒ are compiled to ‒ Java byte codes (which then stored in .class file) ‒ a tool called dx then converts Java byte codes into Dalvik byte codes (which are then stored in .dex file i.e., in . Dalvik Executable file) ‒ and are read, verified and executed by DVM (Dalvik Virtual Machine ‒ open-source software meaning a software which is freely available to the public ‒ developed by Dan Bornstein, who named it after the fishing village of Dalvik in Iceland).